<template>
 
  
  <view class="container">
     <!-- 启动页 -->
  <view v-show="showSplashScreen" class="splash-screen" :class="{ 'fade-out': isSplashScreenFading }">
    <image class="splash-image" src="https://s3.bmp.ovh/imgs/2025/09/18/2d61fd2b5e812cf6.jpg" mode="aspectFill"></image>
    <view class="splash-timer">
      <text class="timer-text">{{ countdown }}秒</text>
      <view class="close-button" @click="closeSplashScreen">关闭</view>
    </view>
  </view>
    <!-- 自定义顶部导航栏 -->
    <view class="custom-nav-bar">
      <!-- <text class="nav-bar-title">今晚去哪打</text> -->
       <image
        src="../../static/header.png"
        style="width: 270rpx;height: 68rpx;"
        mode="widthFix"
        class="nav-bar-image"
       />
    </view>
    
    <!-- <view class="header">
      <text class="title">网球场地查询</text>
    </view> -->
    
    <!-- 天气显示组件 -->
    <!-- <view class="weather-display" v-if="hourlyWeatherForecast && hourlyWeatherForecast.length > 0">
      <scroll-view class="weather-scroll" scroll-x="true" show-scrollbar="false" enhanced="true" :show-scrollbar="false">
        <view class="weather-scroll-container">
          <view class="weather-item" v-for="(hourWeather, index) in hourlyWeatherForecast" :key="index">
            <weather-icon :weather-code="hourWeather.weatherCode" size="20" color="#333" />
            <text class="weather-time">{{ hourWeather.hour }}</text>
          </view>
        </view>
      </scroll-view>
    </view> -->
    
    <!-- 表单式日期时间选择器 -->
    <view class="form-selector" style="margin-top: 100rpx;">
      <view class="form-item">
        <view class="form-input form-input-top" @click="showDatePicker">
          <text class="form-value">{{ selectedDate }}</text>
          <view class="form-arrow"></view>
        </view>
      </view>
      
      <view class="form-divider"></view>
      
      <view class="form-item">
        <view class="form-input form-input-bottom" @click="showTimePicker">
          <view class="time-tags-container">
            <view 
              v-for="(time, index) in selectedTimeSlots" 
              :key="index"
              class="time-selected-tag"
            >
              <text class="time-tag-text">{{ time }}</text>
              <text class="time-tag-remove" @click.stop="removeTimeSlot(index)">×</text>
            </view>
            <text v-if="selectedTimeSlots.length === 0" class="form-placeholder">请选择时间</text>
          </view>
          <view class="form-arrow"></view>
        </view>
      </view>
      <!-- 查询和重置按钮移动到search-box位置 -->
    <view class="action-buttons" :class="{ 'loading': loading }">
      <view class="button-container">
         <view class="reset-button" @click="restart">重置</view>
        <view class="query-button" @click="searchVenues" :class="{ 'loading': loading }">
          <text>{{ getQueryButtonText }}</text>
          <div class="circle circle-12"></div>
          <div class="circle circle-11"></div>
          <div class="circle circle-10"></div>
          <div class="circle circle-9"></div>
          <div class="circle circle-8"></div>
          <div class="circle circle-7"></div>
          <div class="circle circle-6"></div>
          <div class="circle circle-5"></div>
          <div class="circle circle-4"></div>
          <div class="circle circle-3"></div>
          <div class="circle circle-2"></div> 
          <div class="circle circle-1"></div>
        </view>
       
      </view>
    </view>
    </view>
    
    
    
    <!-- 日期选择底部弹窗 -->
    <view v-if="showDateModal" class="bottom-modal-mask" @click="closeDateModal">
      <view class="bottom-modal" :class="{ show: showDateModal }" @click.stop>
        <view class="bottom-modal-header">
          <text class="modal-title">选择日期</text>
          <text class="modal-cancel" @click="closeDateModal">取消</text>
        </view>
        <view class="bottom-modal-content">
          <picker-view class="date-picker-view" :value="datePickerValue" @change="onDateChange">
            <picker-view-column>
              <view class="picker-item" v-for="(item, index) in years" :key="index">{{item}}年</view>
            </picker-view-column>
            <picker-view-column>
              <view class="picker-item" v-for="(item, index) in months" :key="index">{{item}}月</view>
            </picker-view-column>
            <picker-view-column>
              <view class="picker-item" v-for="(item, index) in days" :key="index">{{item}}日</view>
            </picker-view-column>
          </picker-view>
        </view>
        <view class="bottom-modal-footer">
          <view class="modal-buttons">
            <view class="modal-reset-button" @click="resetDate">重置</view>
            <button class="confirm-button" @click="confirmDateSelection">确定</button>
          </view>
        </view>
      </view>
    </view>
    
    <view class="filter-section-1">
      <view class="filter-toggle" style="flex: 1;margin-right: 12rpx;">
      <view class="filter-label">只显示标准场</view>
      <view class="custom-switch" :class="{ 'active': showOnlyStandard }" @click="toggleStandardSwitch">
        <view class="switch-thumb"></view>
      </view>
    </view>
    
    <view class="filter-toggle" style="flex: 1;">
      <view class="filter-label">筛选</view>
      <view class="club-selector-wrapper">
        <ClubSelectorPopup 
          :options="clubOptions" 
          v-model="selectedClubs" 
          @change="toggleClubFilter" 
          @court-type-change="toggleCourtTypeFilter"
          @district-filter="handleDistrictFilter"
          @confirm="searchVenues" />
      </view>
    </view>
    
    
    </view>
    
    <view class="content">
      <VenueList 
        :venues="venueList" 
        :loading="loading"
        :hasMore="hasMore"
        :selectedDate="selectedDate"
        @venue-click="goToVenueDetail"
        @load-more="loadMoreVenues"
        @update:venues="updateVenues"
      />
    </view>
    
    <!-- 浮动顶部栏 -->
    <view v-if="showFloatingHeader" class="floating-header">
      <view class="floating-time-tags">
        <view 
          v-for="(time, index) in selectedTimeSlots" 
          :key="index"
          class="floating-time-tag"
        >
          <text class="floating-time-tag-text">{{ time }}</text>
        </view>
        <text v-if="selectedTimeSlots.length === 0" class="no-time">未选择时间</text>
      </view>
      <view class="floating-query-button" @click="searchVenues" :class="{ 'loading': loading }">
          {{ getQueryButtonText }}
        </view>
    </view>
    
    <!-- 地址选择弹窗 -->
    <view v-if="showAddressModal" class="custom-modal-mask" @click="closeAddressModal">
      <view class="custom-modal" @click.stop>
        <view class="modal-header">选择地址</view>
        <view class="modal-content">
          <view class="address-list">
            <view 
              v-for="(address, index) in venueAddresses" 
              :key="index" 
              class="address-item"
              @click="selectAddress(address)"
            >
              <view class="address-location">{{ address.location }}</view>
              <view class="address-detail">{{ address.address }}</view>
              <view class="address-primary" v-if="address.isPrimary">主要地址</view>
            </view>
          </view>
        </view>
        <view class="modal-footer">
          <view class="modal-button cancel-button" @click="closeAddressModal">取消</view>
        </view>
      </view>
    </view>
    
    <!-- 时间选择底部弹窗 -->
    <view v-show="showTimeModal" class="bottom-modal-mask" @click="closeTimeModal">
      <view class="bottom-modal" :class="{ show: showTimeModal }" @click.stop>
        <view class="bottom-modal-header">
          <text class="modal-title">选择时间范围</text>
          <text class="modal-cancel" @click="closeTimeModal">取消</text>
        </view>
        <view class="bottom-modal-content">
          <view class="time-tags-grid">
            <view 
              v-for="(time, index) in timeSlots" 
              :key="index"
              class="time-tag-popup"
              :class="{ 
                active: selectedTimeSlots.includes(time.value),
                'golden-time': time.value === '18:00-19:00' || time.value === '19:00-20:00' || time.value === '20:00-21:00' || time.value === '21:00-22:00',
                disabled: isTimeSlotDisabled(time.value)
              }"
              @click="toggleTimeSlotInModal(time.value)"
            >
              <text class="time-label-popup">{{ time.label }}</text>
            </view>
          </view>
        </view>
        <view class="bottom-modal-footer">
          <view class="modal-buttons">
            <view class="modal-reset-button" @click="resetTimeSlotsInModal">重置</view>
            <button class="confirm-button" @click="confirmTimeSelection">确定</button>
          </view>
        </view>
      </view>
    </view>
    
    <!-- 联系客服弹窗 -->
    <view v-if="showCustomerServiceModal" class="custom-modal-mask" @click="closeCustomerServiceModal">
      <view class="custom-modal" @click.stop>
        <view class="modal-header">联系客服</view>
        <view class="modal-content customer-service-content">
          <view class="wechat-info">客服微信号：ZHAIHANNENG</view>
          <view class="wechat-tip">请添加微信联系客服</view>
        </view>
        <view class="modal-footer">
          <view class="modal-button customer-service-cancel" @click="closeCustomerServiceModal">取消</view>
          <view class="modal-button customer-service-copy" @click="copyWechatId">复制微信号</view>
        </view>
      </view>
    </view>
    
    <!-- 天气提示弹窗 -->
    <weather-alert-modal
      :visible="showWeatherAlertModal"
      :title="weatherAlertData.title"
      :content="weatherAlertData.content"
      :weather-code="weatherAlertData.weatherCode"
      :confirm-color="weatherAlertData.confirmColor"
      @close="closeWeatherAlertModal"
      @confirm="confirmWeatherAlert"
    />
    
    <!-- 液态玻璃效果底部导航栏 -->
    <LiquidGlassNav 
      :current-tab="currentTab" 
      @tab-change="switchTab"
    />
  </view>
</template>

<script>
import VenueList from '@/components/VenueList.vue';
import ClubSelectorPopup from '@/components/ClubSelectorPopup.vue';
import LiquidGlassNav from '@/components/LiquidGlassNav.vue';
import WeatherIcon from '@/components/WeatherIcon.vue';
import WeatherAlertModal from '@/components/WeatherAlertModal.vue';
import { getVenueList } from '@/common/request.js';
import { getVenueByName, getVenueAllAddresses } from '@/common/venueConfig.js';
import { Venue } from '@/common/models.js';
import { XiangYang33XiaoZhenProcessor } from '@/common/venueProcessors/XiangYang33XiaoZhenProcessor.js';
import courtTypeConfig from '@/components/courtTypeConfig.json';
import { BaseVenueProcessor } from '@/common/venueProcessors/BaseVenueProcessor.js'
import { YueJiChengShiZhiGuangProcessor } from '@/common/venueProcessors/YueJiChengShiZhiGuangProcessor.js'
import { YueJiFengTaiProcessor } from '@/common/venueProcessors/YueJiFengTaiProcessor.js'
import { YueJiDianShangYuanProcessor } from '@/common/venueProcessors/YueJiDianShangYuanProcessor.js'
import { YueJiHuMenDaDaoProcessor } from '@/common/venueProcessors/YueJiHuMenDaDaoProcessor.js'
import { XiangYangXingHeChengProcessor } from '@/common/venueProcessors/XiangYangXingHeChengProcessor.js'
import { XiangYangZhenXingChengProcessor } from '@/common/venueProcessors/XiangYangZhenXingChengProcessor.js'
import { AiDongJinFengProcessor } from '@/common/venueProcessors/AiDongJinFengProcessor.js'
import { AiLiProcessor } from '@/common/venueProcessors/AiLiProcessor.js'
import { BuJiProcessor } from '@/common/venueProcessors/BuJiProcessor.js'
import { DongChengProcessor } from '@/common/venueProcessors/DongChengProcessor.js'
import { DongGuanTiYuZhongXinProcessor } from '@/common/venueProcessors/DongGuanTiYuZhongXinProcessor.js'
import { LuoJieProcessor } from '@/common/venueProcessors/LuoJieProcessor.js'

import { SongShanHuTaiLuGeProcessor } from '@/common/venueProcessors/SongShanHuTaiLuGeProcessor.js'
import { ThreePointFiveFuDiProcessor } from '@/common/venueProcessors/ThreePointFiveFuDiProcessor.js'
import { ThreePointFiveNewJiProcessor } from '@/common/venueProcessors/ThreePointFiveNewJiProcessor.js'
import { TuoDeProcessor } from '@/common/venueProcessors/TuoDeProcessor.js'
import { WeiAoXiangShuProcessor } from '@/common/venueProcessors/WeiAoXiangShuProcessor.js'
import { XiangYangCaiHongWanProcessor } from '@/common/venueProcessors/XiangYangCaiHongWanProcessor.js'
import { XiangYangKangDiProcessor } from '@/common/venueProcessors/XiangYangKangDiProcessor.js'
import { XiangYangYaYuanProcessor } from '@/common/venueProcessors/XiangYangYaYuanProcessor.js'
import { YuanFengProcessor } from '@/common/venueProcessors/YuanFengProcessor.js'
import { ZhuoLeProcessor } from '@/common/venueProcessors/ZhuoLeProcessor.js'
import { ZhuoLeTennisProcessor } from '@/common/venueProcessors/ZhuoLeTennisProcessor.js'

export default {
  components: {
    VenueList,
    ClubSelectorPopup,
    LiquidGlassNav,
    WeatherIcon,
    WeatherAlertModal
  },
  data() {
    return {
      currentTab: 'home', // 当前选中的标签
      searchKeyword: '',
      selectedDate: this.getCurrentDate(),
      selectedTimeSlots: [],
      timeSlots: this.generateTimeSlots(),
      venueList: [],
      loading: false,
      hasMore: true,
      page: 1,
      pageSize: 10,
      showOnlyStandard: true,
      clubOptions: [
        '所有球馆',
        '库卡网球',
        '向阳彩鸿湾',
        '向阳康帝校区',
        '向阳雅园校区',
        '向阳33小镇校区',
        '向阳星河城校区',
        '向阳振兴城校区',
        '拓德网球俱乐部',
        '爱动金丰网球俱乐部',
        '卓乐网球',
        '爱力网球',
        '东城体育公园',
        '东莞市体育中心',
        '3.5+网球（新基）',
        '3.5+网球（金色华庭店）',
        '3.5+网球（福地）',
        '松山湖太鲁阁公园',
        '为傲网球（香树店）',
        '埗击网球',
        '源峰网球',
        '罗杰网球',
        '月击网球（城市之光校区）',
        '月击网球（丰泰校区）',
        '月击网球（电商园校区）',
        '月击网球（虎门大道校区）'
      ],
      selectedClubs: [0], // 默认选中所有球馆（索引0）
      selectedClubNames: [],
      courtTypeOptions: ['不限', '硬地室外场', '硬地风雨场/室内场', '红土风雨场'],
      selectedCourtType: '不限',
      courtTypeConfig: courtTypeConfig,
      // 位置相关数据
      currentLocation: {
        latitude: null,
        longitude: null,
        address: ''
      },
      locationAuthorized: false,
      locationLoading: false,
      // 导航相关数据
      showAddressModal: false,
      currentVenue: null,
      venueAddresses: [],
      // 浮动顶部栏相关数据
      showFloatingHeader: false,
      // 时间选择弹窗相关数据
      showTimeModal: false,
      // 备份时间选择，用于取消时恢复
      backupTimeSlots: [],
      // 日期选择弹窗相关数据
      showDateModal: false,
      datePickerValue: [],
      years: [],
      months: [],
      days: [],
      backupSelectedDate: '',
      // 3.5+网球（新基）数据
      diSaiGroundData: null,
      diSaiGroundUseData: null,
      // 3.5+网球（金色华庭店）数据
      jinSeHuaTingGroundData: null,
      jinSeHuaTingGroundUseData: null,
      // 月击网球（虎门大道校区）数据
      yueJiHuMenDaDaoData: null,
      // 联系客服弹窗控制
      showCustomerServiceModal: false,
      // 天气提示弹窗控制
      showWeatherAlertModal: false,
      // 天气提示弹窗数据
      weatherAlertData: {
        title: '天气提示',
        content: '',
        weatherCode: 'd00',
        confirmColor: '#007aff'
      },
      // 当前天气数据
      currentWeather: null,
      // 未来6小时天气预报数据
      hourlyWeatherForecast: [],
      // 地区筛选后的球馆名称
      districtFilteredVenues: [],
      // 控制circle动画的状态
      circleAnimationActive: false,
      // 启动页相关数据
      showSplashScreen: false,
      isSplashScreenFading: false,
      countdown: 3,
      splashTimer: null,
      // 当前正在查询的球馆名称
      currentQueryVenue: ''
    };
  },
  onLoad() {
    // 检查是否需要显示启动页
    const showSplashScreen = uni.getStorageSync('showSplashScreen');
    if (showSplashScreen) {
      // 显示启动页
      this.showSplashScreen = true;
      // 清除启动页显示标记
      uni.removeStorageSync('showSplashScreen');
      // 初始化启动页
      this.initSplashScreen();
    } else {
      // 不显示启动页
      this.showSplashScreen = false;
    }
    
    // 从缓存中加载数据
    this.loadCachedData();
    
    // 获取模糊位置
    this.getFuzzyLocation();
    
    // 获取天气信息
    this.getWeatherInfo();
    
    // 初始化日期选择器并默认显示当前日期
    this.initDatePicker();
    const today = new Date();
    const year = today.getFullYear();
    const month = today.getMonth() + 1;
    const day = today.getDate();
    
    const yearIndex = this.years.indexOf(year);
    const monthIndex = this.months.indexOf(month);
    const dayIndex = this.days.indexOf(day);
    
    this.datePickerValue = [yearIndex, monthIndex, dayIndex];
    // 不默认显示日期选择器
    // this.showDateModal = true;
  },
  
  onShow() {
    // 页面显示时，从缓存中恢复数据
    this.loadCachedData();
    // 检查当前页面路径，确保导航栏选中状态正确
    this.checkCurrentPagePath();
  },
  
  onPullDownRefresh() {
    // 下拉刷新时重新加载数据并更新缓存
    this.refreshData();
  },
  
  // 微信小程序转发功能
  onShareAppMessage() {
    return {
      title: '今晚去哪打',
      path: '/pages/index/index',
      imageUrl: 'https://img1.tosunelectric.com/ms/20250821/bba1954b-b313-4ca8-a485-6a5df21dc780'
    };
  },
  
  mounted() {
    // 默认不加载数据，等待用户搜索
    // this.searchVenues() 
    
    // 获取模糊位置
    this.getFuzzyLocation();
  },
  
  // 页面滚动事件
  onPageScroll(e) {
    this.handleScroll();
  },
  computed: {
    getQueryButtonText() {
      // 如果正在加载中，显示当前正在查询的球馆名称
      if (this.loading && this.currentQueryVenue) {
        return `正在查询${this.currentQueryVenue}`;
      }
      
      // 如果正在加载中但没有当前查询的球馆名称，显示"正在查询"
      if (this.loading && !this.currentQueryVenue) {
        return '正在查询';
      }
      
      // 如果没有选中任何球馆，显示"查询"
      if (!this.selectedClubs || this.selectedClubs.length === 0) {
        return '查询';
      }
      
      // 如果只选中了"所有球馆"（索引0），显示"查询"
      if (this.selectedClubs.length === 1 && this.selectedClubs[0] === 0) {
        return '查询';
      }
      
      // 获取选中的球馆名称，过滤掉"所有球馆"选项（索引为0）
      const filteredClubs = this.selectedClubs.filter(index => index !== 0);
      const selectedClubNames = filteredClubs.map(index => {
        // 直接从clubOptions数组中获取球馆名称
        return this.clubOptions[index] || '未知球馆';
      });
      
      // 如果只选中了一个球馆，返回"查询[球馆名称]"
      if (selectedClubNames.length === 1) {
        return `查询${selectedClubNames[0]}`;
      }
      
      // 如果选中了多个球馆，返回"查询多个球馆"
      return '查询多个球馆';
    }
  },
  methods: {
    // 加载缓存数据
    loadCachedData() {
      try {
        const cachedData = uni.getStorageSync('homePageData');
        if (cachedData) {
          // 恢复场馆列表
          this.venueList = cachedData.venueList || [];
          // 恢复搜索条件
          this.searchKeyword = cachedData.searchKeyword || '';
          
          // 获取缓存中的日期，如果没有则使用当前日期
          let cachedDate = cachedData.selectedDate || this.getCurrentDate();
          
          // 检查缓存日期是否小于当前日期
          const today = new Date();
          const cachedDateObj = new Date(cachedDate);
          
          // 如果缓存日期小于当前日期，则使用当前日期
          if (cachedDateObj < today) {
            cachedDate = this.getCurrentDate();
          }
          
          this.selectedDate = cachedDate;
          this.selectedTimeSlots = cachedData.selectedTimeSlots || [];
          this.showOnlyStandard = cachedData.showOnlyStandard !== undefined ? cachedData.showOnlyStandard : true;
          this.selectedClubNames = cachedData.selectedClubNames || [];
          this.selectedClubs = cachedData.selectedClubs || [0];
          this.selectedCourtType = cachedData.selectedCourtType || '不限';
          this.page = cachedData.page || 1;
          this.hasMore = cachedData.hasMore !== undefined ? cachedData.hasMore : true;
        } else {
          // 如果没有缓存数据，则执行默认搜索
          this.searchVenues();
        }
      } catch (error) {
        this.searchVenues();
      }
    },
    
    // 保存数据到缓存
    saveDataToCache() {
      try {
        const dataToCache = {
          venueList: this.venueList,
          searchKeyword: this.searchKeyword,
          selectedDate: this.selectedDate,
          selectedTimeSlots: this.selectedTimeSlots,
          showOnlyStandard: this.showOnlyStandard,
          selectedClubNames: this.selectedClubNames,
          selectedClubs: this.selectedClubs,
          selectedCourtType: this.selectedCourtType,
          page: this.page,
          hasMore: this.hasMore
        };
        uni.setStorageSync('homePageData', dataToCache);
      } catch (error) {
        console.error('保存数据到缓存失败:', error);
      }
    },
    
    // 刷新数据并更新缓存
    async refreshData() {
      try {
        await this.searchVenues();
        this.saveDataToCache();
      } catch (error) {
        console.error('刷新数据失败:', error);
      } finally {
        uni.stopPullDownRefresh();
      }
    },
    
    // 检查当前页面路径，确保导航栏选中状态正确
    checkCurrentPagePath() {
      try {
        // 获取当前页面路径
        const pages = getCurrentPages();
        const currentPage = pages[pages.length - 1];
        const currentRoute = currentPage.route;
        
        // 根据页面路径设置正确的导航栏选中状态
        if (currentRoute === 'pages/index/index') {
          this.currentTab = 'home';
        } else if (currentRoute === 'pages/court/court') {
          this.currentTab = 'court';
        } else if (currentRoute === 'pages/mine/mine') {
          this.currentTab = 'mine';
        }
      } catch (error) {
        console.error('检查页面路径失败:', error);
      }
    },
    
    updateVenues(newVenues) {
      // 更新场馆列表数据
      this.venueList = newVenues;
    },
    
    getCurrentDate() {
      const today = new Date();
      const year = today.getFullYear();
      const month = String(today.getMonth() + 1).padStart(2, '0');
      const day = String(today.getDate()).padStart(2, '0');
      return `${year}-${month}-${day}`;
    },
    
    generateTimeSlots() {
      const slots = [];
      for (let hour = 6; hour <= 23; hour++) {
        const startHour = hour.toString().padStart(2, '0');
        const endHour = (hour + 1).toString().padStart(2, '0');
        slots.push({
          label: `${startHour}:00-${endHour}:00`,
          value: `${startHour}:00-${endHour}:00`
        });
      }
      return slots;
    },
    
    toggleTimeSlot(timeSlot) {
      const index = this.selectedTimeSlots.indexOf(timeSlot);
      if (index > -1) {
        // 如果已选中，则移除
        this.selectedTimeSlots.splice(index, 1);
      } else {
        // 如果未选中，则添加
        this.selectedTimeSlots.push(timeSlot);
      }
      
      // 不再自动加载数据，由用户点击查询按钮加载
      // 重置页面
      this.page = 1;
      this.venueList = [];
    },
    
    toggleStandardFilter(e) {
      this.showOnlyStandard = e.detail.value;
      // 重置页面
      this.page = 1;
      this.venueList = [];
      // 不再自动加载数据，由用户点击查询按钮加载
      this.searchVenues();
    },
    
    toggleStandardSwitch() {
      this.showOnlyStandard = !this.showOnlyStandard;
      // 重置页面
      this.page = 1;
      this.venueList = [];
      // 不再自动加载数据，由用户点击查询按钮加载
      this.searchVenues();
    },
    
    toggleClubFilter(e) {
      // 处理多选俱乐部过滤
      const selectedIndices = e.detail.value;
      
      // 更新选中的俱乐部索引
      this.selectedClubs = selectedIndices;
      
      // 更新选中的俱乐部名称
      if (selectedIndices.length === 0 || (selectedIndices.length === 1 && selectedIndices[0] === 0)) {
        // 如果没有选择或选择的是"所有球馆"，则清空选中的俱乐部名称
        this.selectedClubNames = [];
        
        // 如果有地区筛选后的球馆名称，则使用这些球馆名称
        if (this.districtFilteredVenues.length > 0) {
          this.selectedClubNames = this.districtFilteredVenues;
        }
      } else {
        // 过滤掉"所有球馆"选项（索引为0）
        const filteredIndices = selectedIndices.filter(index => index !== 0);
        // 更新为当前选中的俱乐部
        this.selectedClubNames = filteredIndices.map(index => this.clubOptions[index]);
      }
      
      // 重置页面
      this.page = 1;
      this.venueList = [];
      // 不再自动加载数据，由用户点击查询按钮加载
    },
    
    handleDistrictFilter(e) {
      // 处理地区筛选事件
      const { venueNames, province, city, district } = e.detail;
      
      // 保存地区筛选后的球馆名称
      this.districtFilteredVenues = venueNames;
      
      // 如果当前选择的是"所有球馆"且有地区筛选，则更新选中的俱乐部名称
      if (this.selectedClubs.length === 1 && this.selectedClubs[0] === 0) {
        this.selectedClubNames = venueNames;
      }
      
      // 重置页面
      this.page = 1;
      this.venueList = [];
    },
    
    dateChange(date) {
      this.selectedDate = date;
      
      // 检查是否为当天日期
      const today = new Date();
      const selectedDate = new Date(this.selectedDate);
      const isToday = today.toDateString() === selectedDate.toDateString();
      
      if (isToday) {
        // 获取当前小时
        const currentHour = today.getHours();
        
        // 重新生成时间槽，只包含当前时间及以后的时间
        this.timeSlots = [];
        for (let hour = currentHour; hour <= 23; hour++) {
          const startHour = hour.toString().padStart(2, '0');
          const endHour = (hour + 1).toString().padStart(2, '0');
          this.timeSlots.push({
            label: `${startHour}:00-${endHour}:00`,
            value: `${startHour}:00-${endHour}:00`
          });
        }
        
        // 清除已选择的过去时间
        this.selectedTimeSlots = this.selectedTimeSlots.filter(timeSlot => {
          const [startHour] = timeSlot.split('-')[0].split(':');
          return parseInt(startHour) >= currentHour;
        });
      } else {
        // 如果不是当天，则显示所有时间槽
        this.timeSlots = this.generateTimeSlots();
      }
      
      // 重置选中的时间槽
      this.selectedTimeSlots = [];
      // 重置页面
      this.page = 1;
      this.venueList = [];
      // 不再自动加载数据，由用户点击查询按钮加载
    },
    
    // 显示日期选择弹窗
    showDatePicker() {
      // 初始化年月日数据
      this.initDatePicker();
      
      // 等待下一个tick，确保years、months、days数组已经初始化
      this.$nextTick(() => {
        // 设置当前选中的日期
        const date = new Date(this.selectedDate);
        const year = date.getFullYear();
        const month = date.getMonth() + 1;
        const day = date.getDate();
        
        const yearIndex = this.years.indexOf(year);
        const monthIndex = this.months.indexOf(month);
        const dayIndex = this.days.indexOf(day);
        
        // 确保所有索引都是有效的
        if (yearIndex !== -1 && monthIndex !== -1 && dayIndex !== -1) {
          this.datePickerValue = [yearIndex, monthIndex, dayIndex];
        } else {
          // 如果索引无效，则使用当前日期
          const currentDate = new Date();
          const currentYear = currentDate.getFullYear();
          const currentMonth = currentDate.getMonth() + 1;
          const currentDay = currentDate.getDate();
          
          const currentYearIndex = this.years.indexOf(currentYear);
          const currentMonthIndex = this.months.indexOf(currentMonth);
          const currentDayIndex = this.days.indexOf(currentDay);
          
          this.datePickerValue = [currentYearIndex, currentMonthIndex, currentDayIndex];
        }
        
        // 备份当前选中的日期
        this.backupSelectedDate = this.selectedDate;
        // 显示弹窗
        this.showDateModal = true;
        this.$forceUpdate();
      });
    },
    
    // 关闭日期选择弹窗
    closeDateModal() {
      this.showDateModal = false;
      // 恢复备份的日期
      this.selectedDate = this.backupSelectedDate;
    },
    
    // 初始化日期选择器
    initDatePicker() {
      const currentDate = new Date();
      const currentYear = currentDate.getFullYear();
      const currentMonth = currentDate.getMonth() + 1;
      const currentDay = currentDate.getDate();
      
      // 计算最大日期（当前日期后5天）
      const maxDate = new Date();
      maxDate.setDate(maxDate.getDate() + 5);
      const maxYear = maxDate.getFullYear();
      const maxMonth = maxDate.getMonth() + 1;
      const maxDay = maxDate.getDate();
      
      // 生成年份范围（当前年份到最大日期年份）
      this.years = [];
      for (let i = currentYear; i <= maxYear; i++) {
        this.years.push(i);
      }
      
      // 生成月份（从当前月份开始）
      this.months = [];
      for (let i = currentMonth; i <= 12; i++) {
        this.months.push(i);
      }
      
      // 生成日期（从当前日期开始）
      this.days = [];
      const daysInMonth = new Date(currentYear, currentMonth, 0).getDate();
      for (let i = currentDay; i <= daysInMonth; i++) {
        this.days.push(i);
      }
      
      // 设置默认选中当前日期
      const yearIndex = this.years.indexOf(currentYear);
      const monthIndex = this.months.indexOf(currentMonth);
      const dayIndex = this.days.indexOf(currentDay);
      
      this.datePickerValue = [yearIndex, monthIndex, dayIndex];
    },
    
    // 日期选择器变化事件
    onDateChange(e) {
      const values = e.detail.value;
      const year = this.years[values[0]];
      const month = this.months[values[1]];
      
      // 更新datePickerValue
      this.datePickerValue = values;
      
      // 根据选择的年份更新月份范围
      const currentDate = new Date();
      const currentYear = currentDate.getFullYear();
      const currentMonth = currentDate.getMonth() + 1;
      
      // 如果是当前年份，则月份从当前月份开始
      if (year === currentYear) {
        this.months = [];
        for (let i = currentMonth; i <= 12; i++) {
          this.months.push(i);
        }
        
        // 如果当前选中的月份小于当前月份，则调整为当前月份
        if (month < currentMonth) {
          const monthIndex = this.months.indexOf(currentMonth);
          if (monthIndex !== -1) {
            this.datePickerValue = [values[0], monthIndex, 0];
          }
        }
      } else {
        // 如果不是当前年份，则显示所有月份
        this.months = [];
        for (let i = 1; i <= 12; i++) {
          this.months.push(i);
        }
      }
      
      // 根据选择的年月更新日期范围
      this.updateDays(year, this.months[this.datePickerValue[1]]);
    },
    
    // 更新日期范围
    updateDays(year, month) {
      const daysInMonth = new Date(year, month, 0).getDate();
      this.days = [];
      
      const currentDate = new Date();
      const currentYear = currentDate.getFullYear();
      const currentMonth = currentDate.getMonth() + 1;
      const currentDay = currentDate.getDate();
      
      // 如果是当前年份和当前月份，则从当前日期开始显示
      if (year === currentYear && month === currentMonth) {
        for (let i = currentDay; i <= daysInMonth; i++) {
          this.days.push(i);
        }
      } else {
        // 否则显示完整的月份日期
        for (let i = 1; i <= daysInMonth; i++) {
          this.days.push(i);
        }
      }
    },
    
    // 重置日期
    resetDate() {
      // 重置为当前日期
      const today = new Date();
      const year = today.getFullYear();
      const month = String(today.getMonth() + 1).padStart(2, '0');
      const day = String(today.getDate()).padStart(2, '0');
      
      const formattedDate = `${year}-${month}-${day}`;
      
      // 更新日期选择器的值
      const yearIndex = this.years.indexOf(year);
      const monthIndex = this.months.indexOf(parseInt(month));
      const dayIndex = this.days.indexOf(parseInt(day));
      
      this.datePickerValue = [yearIndex, monthIndex, dayIndex];
    },
    
    // 确认日期选择
    confirmDateSelection() {
      const values = this.datePickerValue;
      const year = this.years[values[0]];
      const month = String(this.months[values[1]]).padStart(2, '0');
      const day = String(this.days[values[2]]).padStart(2, '0');
      
      const formattedDate = `${year}-${month}-${day}`;
      
      // 检查日期是否在允许范围内（当前日期到当前日期后5天）
      const selectedDate = new Date(year, month - 1, day);
      const currentDate = new Date();
      currentDate.setHours(0, 0, 0, 0);
      
      const maxDate = new Date();
      maxDate.setDate(maxDate.getDate() + 5);
      maxDate.setHours(23, 59, 59, 999);
      
      if (selectedDate < currentDate || selectedDate > maxDate) {
        uni.showToast({
          title: '请选择当前日期到后5天内的日期',
          icon: 'none'
        });
        return;
      }
      
      // 更新选中的日期
      this.selectedDate = formattedDate;
      
      // 重置选中的时间槽
      this.selectedTimeSlots = [];
      
      // 重置页面
      this.page = 1;
      this.venueList = [];
      
      // 关闭弹窗
      this.showDateModal = false;
    },
    
    toggleCourtTypeFilter(e) {
      // 更新选中的球场类型
      this.selectedCourtType = e.detail.courtType;
      // 重置页面
      this.page = 1;
      this.venueList = [];
      // 不重新请求接口，由用户点击查询按钮加载
      // 移除自动调用loadVenueData，避免死循环
      // this.loadVenueData();
    },
    
    checkCourtType(venue) {
      // 如果选择的是"不限"，则返回true
      if (this.selectedCourtType === '不限') {
        return true;
      }
      
      // 获取当前球场类型的配置
      const typeConfig = this.courtTypeConfig[this.selectedCourtType];
      if (!typeConfig) {
        return true; // 如果没有该类型的配置，默认显示
      }
      
      // 获取当前球馆的配置
      const clubConfig = typeConfig[venue.dataSource];
      if (!clubConfig) {
        return false; // 如果该球馆没有配置此类型，则不显示
      }
      
      // 检查场地名称是否匹配配置
      const venueName = venue.name;
      
      // 如果配置是数组，则检查场地名称是否包含数组中的任意一个词
      if (Array.isArray(clubConfig)) {
        return clubConfig.some(configName => 
          venueName.includes(configName)
        );
      }
      
      // 如果配置了exclude，则排除指定场地（优先级最高）
      if (clubConfig.exclude && clubConfig.exclude.length > 0) {
        return !clubConfig.exclude.some(excludeName => 
          venueName.includes(excludeName)
        );
      }
      
      // 如果配置了include，则只包含指定场地
      if (clubConfig.include && clubConfig.include.length > 0) {
        return clubConfig.include.some(includeName => 
          venueName.includes(includeName)
        );
      }
      
      // 如果配置了arrayMatch，则检查场地名称是否包含数组中的任意一个词
      if (clubConfig.arrayMatch && clubConfig.arrayMatch.length > 0) {
        return clubConfig.arrayMatch.some(matchWord => 
          venueName.includes(matchWord)
        );
      }
      
      // 如果配置了includeAll，则包含所有场地
      if (clubConfig.includeAll) {
        return true;
      }
      
      // 默认不显示
      return false;
    },
    
    searchVenues() {
      // 启动circle动画
      this.startCircleAnimation();
      
      // 重置页面
      this.page = 1;
      // 加载写死的场地数据
      return this.loadVenueData().finally(() => {
        // 停止circle动画
        this.stopCircleAnimation();
      });
    },
    
    // 启动circle动画
    startCircleAnimation() {
      this.circleAnimationActive = true;
      // 通过动态添加类名来触发动画
      // 检查document是否可用（在uni-app环境中可能不可用）
      if (typeof document !== 'undefined') {
        const circles = document.querySelectorAll('.circle');
        circles.forEach(circle => {
          circle.classList.add('animate');
        });
      }
    },
    
    // 停止circle动画
    stopCircleAnimation() {
      this.circleAnimationActive = false;
      // 通过移除类名来停止动画
      // 检查document是否可用（在uni-app环境中可能不可用）
      if (typeof document !== 'undefined') {
        const circles = document.querySelectorAll('.circle');
        circles.forEach(circle => {
          circle.classList.remove('animate');
        });
      }
    },
    
    // 处理单个球馆数据并立即显示
    async processAndDisplayVenue(venueData, venueName) {
      try {
        // 处理单个球馆数据
        let processedVenue = null;
        
        // 根据不同的球馆名称处理数据
        if (venueName === '库卡网球' && venueData && venueData.successed && venueData.result && venueData.result.slots) {
          // 处理库卡场地数据
          const venueMap = new Map();
          
          venueData.result.slots.forEach(slot => {
            const venueName = slot.classRoomName;
            if (!venueMap.has(venueName)) {
              venueMap.set(venueName, {
                name: venueName,
                timeSlots: []
              });
            }
            
            // 添加时间槽信息
            venueMap.get(venueName).timeSlots.push({
              time: `${slot.beginDatetime.substring(11, 16)}-${slot.endDatetime.substring(11, 16)}`,
              isFree: slot.status === 0, // status为0表示可预约
              beginDatetime: slot.beginDatetime,
              endDatetime: slot.endDatetime,
              cost: slot.cost
            });
          });
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 1000 + index, // 给库卡场地分配ID
              name: venue.name,
              address: '库卡网球',
              latitude: 39.9042,
              longitude: 116.4074,
              phone: '010-87654321',
              rating: 4.5,
              price: 0,
              facilities: ['室内场地', '专业教练'],
              image: '',
              distance: 2.0,
              timeSlots: venue.timeSlots,
              dataSource: '库卡网球'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理3.5+网球（新基）数据
        // 注意：3.5+网球（新基）数据在loadVenueData方法中处理，这里不再处理
        
        // 处理3.5+网球（金色华庭店）数据
        if (venueName === '3.5+网球（金色华庭店）' && venueData.groundData && venueData.useData) {
          const groundData = venueData.groundData;
          const useData = venueData.useData;
          
          // 按场地名称分组
          const venueMap = new Map();
          
          // 遍历场地信息
          if (groundData.data && groundData.data.records) {
            groundData.data.records.forEach(site => {
              const venueName = site.name;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  timeSlots: []
                });
              }
            });
          }
          
          // 遍历场地使用信息
          if (useData.data && useData.data.records) {
            useData.data.records.forEach(use => {
              const venueName = use.siteName;
              const venue = venueMap.get(venueName);
              
              if (venue) {
                // 解析时间
                const beginDatetime = use.startTime;
                const endDatetime = use.endTime;
                
                // 检查时间值是否存在
                if (beginDatetime && endDatetime) {
                  const timeSlot = `${beginDatetime.substring(11, 16)}-${endDatetime.substring(11, 16)}`;
                  
                  // 添加时间槽信息
                  venue.timeSlots.push({
                    time: timeSlot,
                    isFree: use.status === 0, // status为0表示可预约
                    beginDatetime: beginDatetime,
                    endDatetime: endDatetime,
                    price: use.price
                  });
                }
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 17000 + index, // 给3.5+网球（金色华庭店）场地分配ID
              name: venue.name,
              address: '3.5+网球（金色华庭店）',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654321',
              rating: 4.5,
              price: 0,
              facilities: ['室外场地', '专业教练', '器材租赁'],
              image: '',
              distance: 5.5,
              timeSlots: venue.timeSlots,
              dataSource: '3.5+网球（金色华庭店）'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理3.5+网球（福地）数据
        if (venueName === '3.5+网球（福地）' && venueData.data && venueData.data.itemArr) {
          const itemArr = venueData.data.itemArr;
          const deskArr = venueData.data.deskArr;
          const timeArr = venueData.data.timeArr;
          
          // 按场地名称分组
          const venueMap = new Map();
          
          // 遍历场地信息
          if (deskArr && deskArr.length > 0) {
            deskArr.forEach(desk => {
              const venueName = desk.deskTypeName;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  deskId: desk.deskId,
                  timeSlots: []
                });
              }
            });
          }
          
          // 遍历时间槽信息
          if (timeArr && timeArr.length > 0 && itemArr && itemArr.length > 0) {
            timeArr.forEach((time, timeIndex) => {
              const timeSlot = `${time.timeBegin.substring(0, 5)}-${time.timeEnd.substring(0, 5)}`;
              const beginDatetime = `${this.selectedDate} ${time.timeBegin}`;
              const endDatetime = `${this.selectedDate} ${time.timeEnd}`;
              
              // 检查场地状态
              const status = itemArr[0].status; // 检查第一个场地的状态
              
              // 获取场地信息
              const venue = venueMap.get('福地室内标准场');
              
              if (venue) {
                // 添加时间槽信息
                venue.timeSlots.push({
                  time: timeSlot,
                  isFree: status === 0, // status为0表示可预约
                  beginDatetime: beginDatetime,
                  endDatetime: endDatetime,
                  price: 0
                });
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 18000 + index, // 给3.5+网球（福地）场地分配ID
              name: venue.name,
              address: '3.5+网球（福地）',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654322',
              rating: 4.5,
              price: 0,
              facilities: ['室内场地', '专业教练', '器材租赁'],
              image: '',
              distance: 6.0,
              timeSlots: venue.timeSlots,
              dataSource: '3.5+网球（福地）'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理向阳彩鸿湾数据
        if (venueName === '向阳彩鸿湾' && venueData && venueData.data && venueData.data.result) {
          const venueMap = new Map();
          
          // 遍历场地数据
          if (venueData.data.result) {
            venueData.data.result.forEach(item => {
              const venueName = item.name;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  timeSlots: []
                });
              }
              
              // 添加时间槽信息
              if (item.times && Array.isArray(item.times)) {
                item.times.forEach(time => {
                  venueMap.get(venueName).timeSlots.push({
                    time: time.time,
                    isFree: time.status === 0, // status为0表示可预约
                    beginDatetime: `${this.selectedDate} ${time.time.split('-')[0]}:00`,
                    endDatetime: `${this.selectedDate} ${time.time.split('-')[1]}:00`,
                    price: time.price || 0
                  });
                });
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 2000 + index, // 给向阳彩鸿湾场地分配ID
              name: venue.name,
              address: '向阳彩鸿湾',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654322',
              rating: 4.5,
              price: 0,
              facilities: ['室外场地', '专业教练', '器材租赁'],
              image: '',
              distance: 3.0,
              timeSlots: venue.timeSlots,
              dataSource: '向阳彩鸿湾'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理向阳康帝校区数据
        if (venueName === '向阳康帝校区' && venueData && venueData.data && venueData.data.result) {
          const venueMap = new Map();
          
          // 遍历场地数据
          if (venueData.data.result) {
            venueData.data.result.forEach(item => {
              const venueName = item.name;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  timeSlots: []
                });
              }
              
              // 添加时间槽信息
              if (item.times && Array.isArray(item.times)) {
                item.times.forEach(time => {
                  venueMap.get(venueName).timeSlots.push({
                    time: time.time,
                    isFree: time.status === 0, // status为0表示可预约
                    beginDatetime: `${this.selectedDate} ${time.time.split('-')[0]}:00`,
                    endDatetime: `${this.selectedDate} ${time.time.split('-')[1]}:00`,
                    price: time.price || 0
                  });
                });
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 3000 + index, // 给向阳康帝校区场地分配ID
              name: venue.name,
              address: '向阳康帝校区',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654323',
              rating: 4.5,
              price: 0,
              facilities: ['室外场地', '专业教练', '器材租赁'],
              image: '',
              distance: 3.5,
              timeSlots: venue.timeSlots,
              dataSource: '向阳康帝校区'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理向阳雅园校区数据
        if (venueName === '向阳雅园校区' && venueData && venueData.data && venueData.data.result) {
          const venueMap = new Map();
          
          // 遍历场地数据
          if (venueData.data.result) {
            venueData.data.result.forEach(item => {
              const venueName = item.name;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  timeSlots: []
                });
              }
              
              // 添加时间槽信息
              if (item.times && Array.isArray(item.times)) {
                item.times.forEach(time => {
                  venueMap.get(venueName).timeSlots.push({
                    time: time.time,
                    isFree: time.status === 0, // status为0表示可预约
                    beginDatetime: `${this.selectedDate} ${time.time.split('-')[0]}:00`,
                    endDatetime: `${this.selectedDate} ${time.time.split('-')[1]}:00`,
                    price: time.price || 0
                  });
                });
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 4000 + index, // 给向阳雅园校区场地分配ID
              name: venue.name,
              address: '向阳雅园校区',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654324',
              rating: 4.5,
              price: 0,
              facilities: ['室外场地', '专业教练', '器材租赁'],
              image: '',
              distance: 4.0,
              timeSlots: venue.timeSlots,
              dataSource: '向阳雅园校区'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理向阳33小镇校区数据
        if (venueName === '向阳33小镇校区' && venueData && venueData.data) {
          // 使用XiangYang33XiaoZhenProcessor处理器处理数据
          const processor = new XiangYang33XiaoZhenProcessor();
          if (processor.validateData(venueData)) {
            const venueMap = processor.groupVenues(venueData);
            processor.processTimeSlots(venueMap, venueData);
            processedVenue = processor.convertToVenueList(venueMap);
          }
        }
        
        // 处理向阳星河城校区数据
        if (venueName === '向阳星河城校区' && venueData && venueData.data && venueData.data.result) {
          const venueMap = new Map();
          
          // 遍历场地数据
          if (venueData.data.result) {
            venueData.data.result.forEach(item => {
              const venueName = item.name;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  timeSlots: []
                });
              }
              
              // 添加时间槽信息
              if (item.times && Array.isArray(item.times)) {
                item.times.forEach(time => {
                  venueMap.get(venueName).timeSlots.push({
                    time: time.time,
                    isFree: time.status === 0, // status为0表示可预约
                    beginDatetime: `${this.selectedDate} ${time.time.split('-')[0]}:00`,
                    endDatetime: `${this.selectedDate} ${time.time.split('-')[1]}:00`,
                    price: time.price || 0
                  });
                });
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 6000 + index, // 给向阳星河城校区场地分配ID
              name: venue.name,
              address: '向阳星河城校区',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654326',
              rating: 4.5,
              price: 0,
              facilities: ['室外场地', '专业教练', '器材租赁'],
              image: '',
              distance: 5.0,
              timeSlots: venue.timeSlots,
              dataSource: '向阳星河城校区'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理向阳振兴城校区数据
        if (venueName === '向阳振兴城校区' && venueData) {
          const processor = new XiangYangZhenXingChengProcessor();
          processedVenue = processor.process(venueData, this.selectedDate);
        }
        
        // 处理拓德网球俱乐部数据
        if (venueName === '拓德网球俱乐部' && venueData) {
          const processor = new TuoDeProcessor();
          processedVenue = processor.process(venueData, this.selectedDate);
        }
        
        // 处理爱动金丰网球俱乐部数据
        if (venueName === '爱动金丰网球俱乐部' && venueData && venueData.successed && venueData.result && venueData.result.slots) {
          // 处理爱动金丰网球俱乐部场地数据
          const venueMap = new Map();
          
          venueData.result.slots.forEach(slot => {
            const venueName = slot.classRoomName;
            if (!venueMap.has(venueName)) {
              venueMap.set(venueName, {
                name: venueName,
                timeSlots: []
              });
            }
            
            // 添加时间槽信息
            venueMap.get(venueName).timeSlots.push({
              time: `${slot.beginDatetime.substring(11, 16)}-${slot.endDatetime.substring(11, 16)}`,
              isFree: slot.status === 0, // status为0表示可预约
              beginDatetime: slot.beginDatetime,
              endDatetime: slot.endDatetime,
              cost: slot.cost
            });
          });
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 9000 + index, // 给爱动金丰网球俱乐部场地分配ID
              name: venue.name,
              address: '爱动金丰网球俱乐部',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654329',
              rating: 4.5,
              price: 0,
              facilities: ['室内场地', '专业教练'],
              image: '',
              distance: 6.5,
              timeSlots: venue.timeSlots,
              dataSource: '爱动金丰网球俱乐部'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理卓乐网球数据
        if (venueName === '卓乐网球' && venueData && venueData.successed && venueData.result && venueData.result.slots) {
          // 处理卓乐网球场地数据
          const venueMap = new Map();
          
          venueData.result.slots.forEach(slot => {
            const venueName = slot.classRoomName;
            if (!venueMap.has(venueName)) {
              venueMap.set(venueName, {
                name: venueName,
                timeSlots: []
              });
            }
            
            // 添加时间槽信息
            venueMap.get(venueName).timeSlots.push({
              time: `${slot.beginDatetime.substring(11, 16)}-${slot.endDatetime.substring(11, 16)}`,
              isFree: slot.status === 0, // status为0表示可预约
              beginDatetime: slot.beginDatetime,
              endDatetime: slot.endDatetime,
              cost: slot.cost
            });
          });
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 10000 + index, // 给卓乐网球场分配ID
              name: venue.name,
              address: '卓乐网球',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654330',
              rating: 4.5,
              price: 0,
              facilities: ['室内场地', '专业教练'],
              image: '',
              distance: 7.0,
              timeSlots: venue.timeSlots,
              dataSource: '卓乐网球'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理爱力网球数据
        if (venueName === '爱力网球' && venueData && venueData.successed && venueData.result && venueData.result.slots) {
          // 处理爱力网球场地数据
          const venueMap = new Map();
          
          venueData.result.slots.forEach(slot => {
            const venueName = slot.classRoomName;
            if (!venueMap.has(venueName)) {
              venueMap.set(venueName, {
                name: venueName,
                timeSlots: []
              });
            }
            
            // 添加时间槽信息
            venueMap.get(venueName).timeSlots.push({
              time: `${slot.beginDatetime.substring(11, 16)}-${slot.endDatetime.substring(11, 16)}`,
              isFree: slot.status === 0, // status为0表示可预约
              beginDatetime: slot.beginDatetime,
              endDatetime: slot.endDatetime,
              cost: slot.cost
            });
          });
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 11000 + index, // 给爱力网球场分配ID
              name: venue.name,
              address: '爱力网球',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654331',
              rating: 4.5,
              price: 0,
              facilities: ['室内场地', '专业教练'],
              image: '',
              distance: 7.5,
              timeSlots: venue.timeSlots,
              dataSource: '爱力网球'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理埗击网球数据
        if (venueName === '埗击网球' && venueData && venueData.successed && venueData.result && venueData.result.slots) {
          // 处理埗击网球场地数据
          const venueMap = new Map();
          venueData.result.slots.forEach(slot => {
            const venueName = slot.classRoomName;
            if (!venueMap.has(venueName)) {
              venueMap.set(venueName, {
                name: venueName,
                timeSlots: []
              });
            }
            
            // 添加时间槽信息
            venueMap.get(venueName).timeSlots.push({
              time: `${slot.beginDatetime.substring(11, 16)}-${slot.endDatetime.substring(11, 16)}`,
              isFree: slot.status === 0, // status为0表示可预约
              beginDatetime: slot.beginDatetime,
              endDatetime: slot.endDatetime,
              cost: slot.cost
            });
          });
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 19000 + index, // 给埗击网球场分配ID
              name: venue.name,
              address: '埗击网球',
              latitude: 23.088525,
              longitude: 113.754210,
              phone: '0769-87654332',
              rating: 4.5,
              price: 0,
              facilities: ['室内场地', '专业教练'],
              image: '',
              distance: 8.0,
              timeSlots: venue.timeSlots,
              dataSource: '埗击网球'
            };
          });
          
          processedVenue = venues;
        } else {
            // 数据条件不满足，不处理
        }
        
        // 处理罗杰网球数据
        if (venueName === '罗杰网球' && venueData && venueData.code === 0 && venueData.data && venueData.data.records) {
          // 使用罗杰网球俱乐部处理器处理数据
          const processor = new LuoJieProcessor();
          processedVenue = processor.process(venueData, this.selectedDate);
        }
        
        // 处理东城体育公园数据
        if (venueName === '东城体育公园' && venueData && venueData.data && venueData.data.result) {
          const venueMap = new Map();
          
          // 遍历场地数据
          if (venueData.data.result) {
            venueData.data.result.forEach(item => {
              const venueName = item.name;
              if (!venueMap.has(venueName)) {
                venueMap.set(venueName, {
                  name: venueName,
                  timeSlots: []
                });
              }
              
              // 添加时间槽信息
              if (item.times && Array.isArray(item.times)) {
                item.times.forEach(time => {
                  venueMap.get(venueName).timeSlots.push({
                    time: time.time,
                    isFree: time.status === 0, // status为0表示可预约
                    beginDatetime: `${this.selectedDate} ${time.time.split('-')[0]}:00`,
                    endDatetime: `${this.selectedDate} ${time.time.split('-')[1]}:00`,
                    price: time.price || 0
                  });
                });
              }
            });
          }
          
          // 转换为场地列表
          const venues = Array.from(venueMap.values()).map((venue, index) => {
            return {
              id: 12000 + index, // 给东城体育公园场地分配ID
              name: venue.name,
              address: '东城体育公园',
              latitude: 23.0489,
              longitude: 113.7447,
              phone: '0769-87654332',
              rating: 4.5,
              price: 0,
              facilities: ['室外场地', '专业教练', '器材租赁'],
              image: '',
              distance: 8.0,
              timeSlots: venue.timeSlots,
              dataSource: '东城体育公园'
            };
          });
          
          processedVenue = venues;
        }
        
        // 处理东莞市体育中心数据
        if (venueName === '东莞市体育中心' && venueData && venueData.data && Array.isArray(venueData.data)) {
          // 使用东莞市体育中心处理器处理数据
          const processor = new DongGuanTiYuZhongXinProcessor();
          processedVenue = processor.process(venueData.data, this.selectedDate);
        }
        
        // 处理松山湖太鲁阁公园数据
        if (venueName === '松山湖太鲁阁公园' && venueData) {
          // 使用松山湖太鲁阁公园处理器处理数据
          const processor = new SongShanHuTaiLuGeProcessor();
          processedVenue = processor.process(venueData, this.selectedDate);
        }
        
        // 如果处理成功，则添加到场地列表并更新显示
        if (processedVenue && processedVenue.length > 0) {
          
          // 应用过滤条件
          let filteredVenues = processedVenue;
          
          // 根据搜索关键词过滤
          if (this.searchKeyword) {
            filteredVenues = filteredVenues.filter(item => 
              (item.name && item.name.includes(this.searchKeyword)) || 
              (item.address && item.address.includes(this.searchKeyword))
            );
          }
          
          // 如果只显示标准场，则过滤掉非标准场地
          if (this.showOnlyStandard) {
            // 从配置文件中获取非标准场地列表
            const courtTypeConfig = require('@/components/courtTypeConfig.json');
            const nonStandardFields = [];
            
            // 遍历配置文件中的非标准场数据
            Object.values(courtTypeConfig['非标准场']).forEach(venues => {
              if (Array.isArray(venues)) {
                nonStandardFields.push(...venues);
              }
            });
            
            filteredVenues = filteredVenues.filter(item => 
              item.name && !nonStandardFields.some(field => item.name.includes(field))
            );
          }
          
          // 如果选择了特定俱乐部，则只显示该俱乐部的场地
          if (this.selectedClubNames.length > 0) {
            filteredVenues = filteredVenues.filter(item => 
              item.dataSource && this.selectedClubNames.includes(item.dataSource)
            );
          }
          
          // 根据球场类型配置过滤场地数据
          if (this.selectedCourtType !== '不限') {
            filteredVenues = filteredVenues.filter(item => 
              this.checkCourtType(item)
            );
          }
          
          // 转换数据模型
          let venues = filteredVenues.map(item => {
            // 创建新的场地对象
            const venue = new Venue(item);
            
            // 如果有选中的时间槽，则根据时间槽设置available属性
            if (this.selectedTimeSlots.length > 0) {
              const allTimeSlotsFree = this.selectedTimeSlots.every(selectedSlot => {
                const matchingSlot = venue.timeSlots.find(slot => {
                  // 比较时间范围是否匹配
                  const slotStartTime = slot.beginDatetime || `${this.selectedDate} ${slot.time.split('-')[0]}:00`;
                  const slotEndTime = slot.endDatetime || `${this.selectedDate} ${slot.time.split('-')[1]}:00`;
                  
                  // 解析选中的时间槽
                  const [selectedStartHour, selectedStartMinute] = selectedSlot.split('-')[0].split(':');
                  const [selectedEndHour, selectedEndMinute] = selectedSlot.split('-')[1].split(':');
                  
                  // 将日期格式转换为iOS支持的格式
                  const formatDateForIOS = (dateStr) => {
                    if (!dateStr) return new Date();
                    
                    // 如果已经是ISO格式或支持的格式，直接使用
                    if (dateStr.includes('T') || dateStr.includes('/')) {
                      return new Date(dateStr);
                    }
                    
                    // 将 "yyyy-MM-dd HH:mm:ss" 格式转换为 "yyyy/MM/dd HH:mm:ss"
                    const formattedStr = dateStr.replace(/-/g, '/');
                    return new Date(formattedStr);
                  };
                  
                  const selectedStartTime = formatDateForIOS(`${this.selectedDate} ${selectedStartHour}:${selectedStartMinute}:00`).getTime();
                  const selectedEndTime = formatDateForIOS(`${this.selectedDate} ${selectedEndHour}:${selectedEndMinute}:00`).getTime();
                  
                  const slotStart = formatDateForIOS(slotStartTime).getTime();
                  const slotEnd = formatDateForIOS(slotEndTime).getTime();
                  
                  // 检查时间范围是否有重叠
                  const isOverlap = selectedStartTime < slotEnd && selectedEndTime > slotStart;
                  
                  return isOverlap;
                });
                
                // 如果找到匹配的时段且为空闲，则返回true
                return matchingSlot && matchingSlot.isFree;
              });
              
              venue.available = allTimeSlotsFree;
            } else {
              // 如果没有选中的时间槽，将available设置为undefined
              venue.available = undefined;
            }
            
            return venue;
          });
          
          venues = venues.filter(venue => venue.available !== false);
          
          // 添加到场地列表
          this.venueList = [...this.venueList, ...venues];
          // 按距离排序场地列表
          this.venueList.sort((a, b) => {
            // 如果distance属性存在，则按distance排序
            if (a.distance !== undefined && b.distance !== undefined) {
              return a.distance - b.distance;
            }
            // 如果只有a有distance属性，则a排在前面
            if (a.distance !== undefined) {
              return -1;
            }
            // 如果只有b有distance属性，则b排在前面
            if (b.distance !== undefined) {
              return 1;
            }
            // 如果都没有distance属性，则按名称排序
            return a.name.localeCompare(b.name);
          });
          
          // 触发UI更新
          this.$forceUpdate();
        } else {
          // 没有场地可添加
        }
      } catch (error) {
        // 处理数据失败
      }
    },
    
    async loadVenueData() {
      if (this.loading) return;
      
      this.loading = true;
      // 清空当前场地列表
      this.venueList = [];
      
      // 初始化allData数组
      let allData = [];
      
      try {
        // 根据选中的俱乐部决定请求哪些数据
        // 如果有地区筛选后的球馆名称，则使用这些球馆名称
        const selectedClubs = this.selectedClubNames.length > 0 ? 
          this.selectedClubNames : 
          (this.districtFilteredVenues.length > 0 ? this.districtFilteredVenues : ['所有球馆']);
        
        // 初始化所有数据变量
        let zhuoLeData = null, xiangYangData = null, xiangYangKangDiData = null, xiangYangYaYuanData = null;
        let xiangYang33Data = null, xiangYangXingHeChengData = null, xiangYangZhenXingChengData = null;
        let tuoDeData = null, aiDongJinFengData = null, zhuoLeTennisData = null, aiLiData = null;
        let dongChengData = null, dongGuanSportsCenterData = null, jinManGuanData = null, diSaiGroundData = null, diSaiGroundUseData = null;
        let jinSeHuaTingGroundData = null, songShanHuData = null, weiAoData = null, yuanFengData = null,buJiData = null;
        // 只请求选中的俱乐部数据，并立即处理显示
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('库卡网球')) {
          this.currentQueryVenue = '库卡网球';
          try {
            const zhuoLeProcessor = new ZhuoLeProcessor();
            zhuoLeData = await zhuoLeProcessor.getVenueSettings({
              userId: 5710920,
              projectUid: "1725630736098549713",
              dateTime: this.selectedDate
            });
          } catch (error) {
            console.log(error);
            
            // 忽略错误
          }
          // console.log('zhuoLeData', zhuoLeData);
          // 立即处理并显示库卡网球数据
          await this.processAndDisplayVenue(zhuoLeData, '库卡网球');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('向阳彩鸿湾')) {
          this.currentQueryVenue = '向阳彩鸿湾';
          try {
            const xiangYangCaiHongWanProcessor = new XiangYangCaiHongWanProcessor();
            xiangYangData = await xiangYangCaiHongWanProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            console.log(error);
            
            // 忽略错误
          }
          // console.log('xiangYangData', xiangYangData);
          // 立即处理并显示向阳彩鸿湾数据
          await this.processAndDisplayVenue(xiangYangData, '向阳彩鸿湾');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('向阳康帝校区')) {
          this.currentQueryVenue = '向阳康帝校区';
          try {
            const xiangYangKangDiProcessor = new XiangYangKangDiProcessor();
            xiangYangKangDiData = await xiangYangKangDiProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('xiangYangKangDiData', xiangYangKangDiData);
          // 立即处理并显示向阳康帝校区数据
          await this.processAndDisplayVenue(xiangYangKangDiData, '向阳康帝校区');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('向阳雅园校区')) {
          this.currentQueryVenue = '向阳雅园校区';
          try {
            const xiangYangYaYuanProcessor = new XiangYangYaYuanProcessor();
            xiangYangYaYuanData = await xiangYangYaYuanProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('xiangYangYaYuanData', xiangYangYaYuanData);
          // 立即处理并显示向阳雅园校区数据
          await this.processAndDisplayVenue(xiangYangYaYuanData, '向阳雅园校区');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('向阳33小镇校区')) {
          this.currentQueryVenue = '向阳33小镇校区';
          try {
            const xiangYang33XiaoZhenProcessor = new XiangYang33XiaoZhenProcessor();
            xiangYang33Data = await xiangYang33XiaoZhenProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('xiangYang33Data', xiangYang33Data);
          // 立即处理并显示向阳33小镇校区数据
          await this.processAndDisplayVenue(xiangYang33Data, '向阳33小镇校区');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('向阳星河城校区')) {
          this.currentQueryVenue = '向阳星河城校区';
          try {
            const xiangYangXingHeChengProcessor = new XiangYangXingHeChengProcessor();
            xiangYangXingHeChengData = await xiangYangXingHeChengProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('xiangYangXingHeChengData', xiangYangXingHeChengData);
          // 立即处理并显示向阳星河城校区数据
          await this.processAndDisplayVenue(xiangYangXingHeChengData, '向阳星河城校区');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('向阳振兴城校区')) {
          this.currentQueryVenue = '向阳振兴城校区';
          try {
            const xiangYangZhenXingChengProcessor = new XiangYangZhenXingChengProcessor();
            xiangYangZhenXingChengData = await xiangYangZhenXingChengProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            console.log(error);
            
            // 忽略错误
          }
          // console.log('xiangYangZhenXingChengData', xiangYangZhenXingChengData);
          // 立即处理并显示向阳振兴城校区数据
          await this.processAndDisplayVenue(xiangYangZhenXingChengData, '向阳振兴城校区');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('拓德网球俱乐部')) {
          this.currentQueryVenue = '拓德网球俱乐部';
          try {
            const tuoDeProcessor = new TuoDeProcessor();
            tuoDeData = await tuoDeProcessor.getVenueSettings({
              reserveDate: this.selectedDate
            });
          } catch (error) {
            console.log(error);
            
            // 忽略错误
          }
          console.log('tuoDeData', tuoDeData);
          // 立即处理并显示拓德网球俱乐部数据
          await this.processAndDisplayVenue(tuoDeData, '拓德网球俱乐部');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('爱动金丰网球俱乐部')) {
          this.currentQueryVenue = '爱动金丰网球俱乐部';
          try {
            const aiDongJinFengProcessor = new AiDongJinFengProcessor();
            aiDongJinFengData = await aiDongJinFengProcessor.getVenueSettings({
              userId: 5554966,
              projectUid: "0",
              dateTime: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('aiDongJinFengData', aiDongJinFengData);
          // 立即处理并显示爱动金丰网球俱乐部数据
          await this.processAndDisplayVenue(aiDongJinFengData, '爱动金丰网球俱乐部');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('卓乐网球')) {
          this.currentQueryVenue = '卓乐网球';
          try {
            const zhuoLeTennisProcessor = new ZhuoLeTennisProcessor();
            zhuoLeTennisData = await zhuoLeTennisProcessor.getVenueSettings({
              userId: 5786253,
              projectUid: "1735800065527617183",
              dateTime: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('zhuoLeTennisData', zhuoLeTennisData);
          // 立即处理并显示卓乐网球数据
          await this.processAndDisplayVenue(zhuoLeTennisData, '卓乐网球');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('爱力网球')) {
          this.currentQueryVenue = '爱力网球';
          try {
            const aiLiProcessor = new AiLiProcessor();
            aiLiData = await aiLiProcessor.getVenueSettings({
              userId: 5900824,
              projectUid: "1751942352901414898",
              dateTime: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('aiLiData', aiLiData);
          // 立即处理并显示爱力网球数据
          await this.processAndDisplayVenue(aiLiData, '爱力网球');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('东城体育公园')) {
          this.currentQueryVenue = '东城体育公园';
          try {
            const dongChengProcessor = new DongChengProcessor();
            dongChengData = await dongChengProcessor.getVenueSettings({
              gym_id: 1,
              type: 'site',
              filter_front_reserve: 0,
              date: this.selectedDate.replace(/-/g, '-')
            });
          } catch (error) {
            // 忽略错误
            console.log(error);
            
          }
          // console.log('dongChengData', dongChengData);
          // 立即处理并显示东城体育公园数据
          await this.processAndDisplayVenue(dongChengData, '东城体育公园');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('东莞市体育中心')) {
          this.currentQueryVenue = '东莞市体育中心';
          try {
            const dongGuanSportsCenterProcessor = new DongGuanTiYuZhongXinProcessor();
            dongGuanSportsCenterData = await dongGuanSportsCenterProcessor.getVenueSettings({
              gym_id: 5,
              type: 'site',
              date: this.selectedDate.replace(/-/g, '-')
            });
          } catch (error) {
            // 忽略错误
          }
          console.log('dongGuanSportsCenterData', dongGuanSportsCenterData);
          // 立即处理并显示东莞市体育中心数据
          await this.processAndDisplayVenue(dongGuanSportsCenterData, '东莞市体育中心');
        }
        

        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('3.5+网球（新基）')) {
          this.currentQueryVenue = '3.5+网球（新基）';
          // 获取场地基本信息
          try {
            // const diSaiProcessor = new ThreePointFiveNewJiProcessor();
            // this.diSaiGroundData = await diSaiProcessor.getGroundPage({
            //   sportHallId: "7",
            //   page: 1,
            //   limit: -1,
            //   whetherOpenUse: 1
            // });
          } catch (error) {
            // 忽略错误
          }
          // console.log('diSaiGroundData', this.diSaiGroundData);
          
          // 获取场地使用信息
          const startDate = this.selectedDate + ' 00:00:00';
          const endDate = this.selectedDate + ' 23:59:59';
          try {
            const diSaiProcessor = new ThreePointFiveNewJiProcessor();
            this.diSaiGroundUseData = await diSaiProcessor.getGroundUsePage({
              sportHallId: "7",
              startDate: startDate,
              endDate: endDate,
              page: 1,
              limit: -1
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('diSaiGroundUseData', this.diSaiGroundUseData);
          
          // 注意：3.5+网球（新基）数据在loadVenueData方法中处理，这里不再调用processAndDisplayVenue
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('3.5+网球（金色华庭店）')) {
          this.currentQueryVenue = '3.5+网球（金色华庭店）';
          // 获取场地基本信息
          try {
            const jinSeHuaTingProcessor = new JinSeHuaTingProcessor();
            this.jinSeHuaTingGroundData = await jinSeHuaTingProcessor.getVenueSettings({
              sportHallId: "8",
              page: 1,
              limit: -1,
              whetherOpenUse: 1
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('jinSeHuaTingGroundData', this.jinSeHuaTingGroundData);
          
          // 获取场地使用信息
          const startDate = this.selectedDate + ' 00:00:00';
          const endDate = this.selectedDate + ' 23:59:59';
          try {
            const jinSeHuaTingProcessor = new JinSeHuaTingProcessor();
            this.jinSeHuaTingGroundUseData = await jinSeHuaTingProcessor.getVenueSettings({
              sportHallId: "8",
              startDate: startDate,
              endDate: endDate,
              page: 1,
              limit: -1
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('jinSeHuaTingGroundUseData', this.jinSeHuaTingGroundUseData);
          
          // 立即处理并显示3.5+网球（金色华庭店）数据
          await this.processAndDisplayVenue({
            groundData: this.jinSeHuaTingGroundData,
            useData: this.jinSeHuaTingGroundUseData
          }, '3.5+网球（金色华庭店）');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('松山湖太鲁阁公园')) {
          this.currentQueryVenue = '松山湖太鲁阁公园';
          console.log('正在查询松山湖太鲁阁公园数据，日期:', this.selectedDate);
          try {
            // 将日期格式从YYYY-MM-DD转换为YYYY-M-D格式
            const formattedDate = this.selectedDate.replace(/-(\d)(?=\d|$)/g, '-$1').replace(/^0/, '').replace(/-0/g, '-');
            const taiLuGeProcessor = new SongShanHuTaiLuGeProcessor();
            songShanHuData = await taiLuGeProcessor.getVenueSettings({
              date: formattedDate
            });
            console.log('松山湖太鲁阁公园数据获取成功:', songShanHuData);
          // 立即处理并显示松山湖太鲁阁公园数据
          await this.processAndDisplayVenue(songShanHuData, '松山湖太鲁阁公园');
          } catch (error) {
            console.error('获取松山湖太鲁阁公园数据失败:', error);
            // 忽略错误
          }
          
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('为傲网球（香树店）')) {
          // 获取为傲网球（香树店）场地预定信息
          try {
            const weiAoProcessor = new WeiAoXiangShuProcessor();
            weiAoData = await weiAoProcessor.getVenueSettings({
              companyId: "4609",
              storeId: "5042",
              customerId: "3604632",
              motionCusId: "",
              rentVenueId: "863",
              rentAreaId: "2156",
              calendar: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('weiAoData', weiAoData);
          // 立即处理并显示为傲网球（香树店）数据
          await this.processAndDisplayVenue(weiAoData, '为傲网球（香树店）');
        }

        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('3.5+网球（福地）')) {
          this.currentQueryVenue = '3.5+网球（福地）';
          // 获取3.5+网球（福地）场地预定信息
          try {
            const fuDiProcessor = new ThreePointFiveFuDiProcessor();
            this.fuDiData = await fuDiProcessor.getVenueSettings({
              date: this.selectedDate,
              deskTypeId: "463560331927552",
              shopId: "455834640958464",
              shopName: "3.5+网球运动馆",
              token: ""
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('fuDiData', this.fuDiData);
          // 立即处理并显示3.5+网球（福地）数据
          await this.processAndDisplayVenue(this.fuDiData, '3.5+网球（福地）');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('埗击网球')) {
          this.currentQueryVenue = '埗击网球';
          // 获取埗击网球场地预定信息
          try {
            const buJiProcessor = new BuJiProcessor();
            buJiData = await buJiProcessor.getVenueSettings({
              userId: 5860108,
              projectUid: "1745985425105631705",
              dateTime: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('buJiData', buJiData);
          // 添加更多调试信息
          // console.log('buJiData structure:', {
          //   hasData: !!buJiData,
          //   successed: buJiData?.successed,
          //   hasResult: !!buJiData?.result,
          //   hasSlots: !!buJiData?.result?.slots,
          //   slotsLength: buJiData?.result?.slots?.length || 0
          // });
          // 立即处理并显示埗击网球数据
          await this.processAndDisplayVenue(buJiData, '埗击网球');
        }
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('源峰网球')) {
          this.currentQueryVenue = '源峰网球';
          // 获取源峰网球场地预定信息
          try {
            const yuanFengProcessor = new YuanFengProcessor();
            yuanFengData = await yuanFengProcessor.getVenueSettings({
              userId: 5871935,
              projectUid: "1747877670713849594",
              dateTime: this.selectedDate
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('yuanFengData', yuanFengData);
          // 立即处理并显示源峰网球数据
          await this.processAndDisplayVenue(yuanFengData, '源峰网球');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('罗杰网球')) {
          this.currentQueryVenue = '罗杰网球';
          // 获取罗杰网球场地信息
          const startDate = this.selectedDate + ' 00:00:00';
          const endDate = this.selectedDate + ' 23:59:59';
          try {
            const luoJieProcessor = new LuoJieProcessor();
            this.luoJieData = await luoJieProcessor.getVenueSettings({
              sportHallId: "17",
              startDate: startDate,
              endDate: endDate,
              page: 1,
              limit: -1,
              whetherOpenUse: 1
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('luoJieData', this.luoJieData);
          
          // 立即处理并显示罗杰网球数据
          await this.processAndDisplayVenue(this.luoJieData, '罗杰网球');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('月击网球（城市之光校区）')) {
          this.currentQueryVenue = '月击网球（城市之光校区）';
          // 获取月击网球（城市之光校区）场地预定信息
          try {
            const yueJiChengShiZhiGuangProcessor = new YueJiChengShiZhiGuangProcessor();
            this.yueJiData = await yueJiChengShiZhiGuangProcessor.getVenueSettings({
              id: "2883247634186321",
              date: this.selectedDate.replace(/-/g, '/'),
              page: 1,
              size: 10
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('yueJiData', this.yueJiData);
          // 立即处理并显示月击网球（城市之光校区）数据
          await this.processAndDisplayVenue(this.yueJiData, '月击网球（城市之光校区）');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('月击网球（丰泰校区）')) {
          this.currentQueryVenue = '月击网球（丰泰校区）';
          // 获取月击网球（丰泰校区）场地预定信息
          try {
            const yueJiFengTaiProcessor = new YueJiFengTaiProcessor();
            this.yueJiFengTaiData = await yueJiFengTaiProcessor.getVenueSettings({
              id: "2982889030025338",
              date: this.selectedDate.replace(/-/g, '/'),
              page: 1,
              size: 10
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('yueJiFengTaiData', this.yueJiFengTaiData);
          // 立即处理并显示月击网球（丰泰校区）数据
          await this.processAndDisplayVenue(this.yueJiFengTaiData, '月击网球（丰泰校区）');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('月击网球（电商园校区）')) {
          this.currentQueryVenue = '月击网球（电商园校区）';
          // 获取月击网球（电商园校区）场地预定信息
          try {
            const yueJiDianShangYuanProcessor = new YueJiDianShangYuanProcessor();
            this.yueJiDianShangYuanData = await yueJiDianShangYuanProcessor.getVenueSettings({
              id: "2803019859755125",
              date: this.selectedDate.replace(/-/g, '/'),
              page: 1,
              size: 10
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('yueJiDianShangYuanData', this.yueJiDianShangYuanData);
          // 立即处理并显示月击网球（电商园校区）数据
          await this.processAndDisplayVenue(this.yueJiDianShangYuanData, '月击网球（电商园校区）');
        }
        
        if (selectedClubs.includes('所有球馆') || selectedClubs.includes('月击网球（虎门大道校区）')) {
          this.currentQueryVenue = '月击网球（虎门大道校区）';
          // 获取月击网球（虎门大道校区）场地预定信息
          try {
            const yueJiHuMenDaDaoProcessor = new YueJiHuMenDaDaoProcessor();
            this.yueJiHuMenDaDaoData = await yueJiHuMenDaDaoProcessor.getVenueSettings({
              id: "2803022711881772",
              date: this.selectedDate.replace(/-/g, '/'),
              page: 1,
              size: 10
            });
          } catch (error) {
            // 忽略错误
          }
          // console.log('yueJiHuMenDaDaoData', this.yueJiHuMenDaDaoData);
          // 立即处理并显示月击网球（虎门大道校区）数据
          await this.processAndDisplayVenue(this.yueJiHuMenDaDaoData, '月击网球（虎门大道校区）');
        }
        
        // 解析罗杰网球俱乐部数据
        let luoJieVenues = [];
        if (this.luoJieData && this.luoJieData.code === 0 && this.luoJieData.data && this.luoJieData.data.records) {
          // 使用罗杰网球俱乐部处理器处理数据
          const processor = new LuoJieProcessor();
          luoJieVenues = processor.process(this.luoJieData, this.selectedDate);
        }
        
        // 将罗杰网球场数据添加到allData数组
        allData.push(...luoJieVenues);
        // 解析远峰体育中心数据
        let yuanFengVenues = [];
        if (yuanFengData && yuanFengData.successed && yuanFengData.result && yuanFengData.result.slots) {
          // 使用远峰体育中心处理器处理数据
          const processor = new YuanFengProcessor();
          yuanFengVenues = processor.process(yuanFengData.result, this.selectedDate);
        }
        
        // 将源峰网球场数据添加到allData数组
        allData.push(...yuanFengVenues);
        
        // 解析月击网球（城市之光校区）场地数据
        let yueJiVenues = [];
        if (this.yueJiData && this.yueJiData.code === 0 && this.yueJiData.data && this.yueJiData.data.list) {
          // 使用月击网球（城市之光校区）处理器处理数据
          const processor = new YueJiChengShiZhiGuangProcessor();
          yueJiVenues = processor.process(this.yueJiData.data, this.selectedDate);
        }
        
        // 将月击网球（城市之光校区）数据添加到allData数组
        allData.push(...yueJiVenues);
        
        // 解析月击网球（丰泰校区）场地数据
        let yueJiFengTaiVenues = [];
        if (this.yueJiFengTaiData && this.yueJiFengTaiData.code === 0 && this.yueJiFengTaiData.data && this.yueJiFengTaiData.data.list) {
          // 使用月击网球（丰泰校区）处理器处理数据
          const processor = new YueJiFengTaiProcessor();
          yueJiFengTaiVenues = processor.process(this.yueJiFengTaiData.data, this.selectedDate);
        }
        
        // 将月击网球（丰泰校区）数据添加到allData数组
        allData.push(...yueJiFengTaiVenues);
        
        // 解析月击网球（电商园校区）场地数据
        let yueJiDianShangYuanVenues = [];
        if (this.yueJiDianShangYuanData && this.yueJiDianShangYuanData.code === 0 && this.yueJiDianShangYuanData.data && this.yueJiDianShangYuanData.data.list) {
          // 使用月击网球（电商园校区）处理器处理数据
          const processor = new YueJiDianShangYuanProcessor();
          yueJiDianShangYuanVenues = processor.process(this.yueJiDianShangYuanData.data, this.selectedDate);
        }
        
        // 将月击网球（电商园校区）数据添加到allData数组
        allData.push(...yueJiDianShangYuanVenues);
        
        // 解析月击网球（虎门大道校区）场地数据
        let yueJiHuMenDaDaoVenues = [];
        if (this.yueJiHuMenDaDaoData && this.yueJiHuMenDaDaoData.code === 0 && this.yueJiHuMenDaDaoData.data && this.yueJiHuMenDaDaoData.data.list) {
          // 使用月击网球（虎门大道校区）处理器处理数据
          const processor = new YueJiHuMenDaDaoProcessor();
          yueJiHuMenDaDaoVenues = processor.process(this.yueJiHuMenDaDaoData.data, this.selectedDate);
        }
        
        // 将月击网球（虎门大道校区）数据添加到allData数组
        allData.push(...yueJiHuMenDaDaoVenues);
        
        // 解析库卡场地数据
        let zhuoLeVenues = [];
        if (zhuoLeData && zhuoLeData.successed && zhuoLeData.result && zhuoLeData.result.slots) {
          // 使用库卡网球场处理器处理数据
          const processor = new ZhuoLeProcessor();
          zhuoLeVenues = processor.process(zhuoLeData, this.selectedDate);
        }
        // console.log('zhuoLeVenues',zhuoLeVenues);
        
        // 解析向阳彩鸿湾场地数据
        let xiangYangVenues = [];
        if (xiangYangData && xiangYangData.data) {
          // 使用向阳彩鸿湾处理器处理数据
          const processor = new XiangYangCaiHongWanProcessor();
          xiangYangVenues = processor.process(xiangYangData, this.selectedDate);
        }
        // console.log('xiangYangVenues', xiangYangVenues);
        
        // 解析向阳康帝校区场地数据
        let xiangYangKangDiVenues = [];
        if (xiangYangKangDiData && xiangYangKangDiData.data) {
          // 使用向阳康帝校区处理器处理数据
          const processor = new XiangYangKangDiProcessor();
          xiangYangKangDiVenues = processor.process(xiangYangKangDiData, this.selectedDate);
        }
        // console.log('xiangYangKangDiVenues', xiangYangKangDiVenues);
        
        // 解析向阳雅园校区场地数据
        let xiangYangYaYuanVenues = [];
        if (xiangYangYaYuanData && xiangYangYaYuanData.data) {
          // 使用向阳雅园校区处理器处理数据
          const processor = new XiangYangYaYuanProcessor();
          xiangYangYaYuanVenues = processor.process(xiangYangYaYuanData, this.selectedDate);
        }
        
        // 解析向阳33小镇校区场地数据
        let xiangYang33Venues = [];
        if (xiangYang33Data && xiangYang33Data.data && xiangYang33Data.data.siteInfoTOs && xiangYang33Data.data.timeIntervalTOs) {
          // 使用向阳33小镇校区处理器处理数据
          const processor = new XiangYang33XiaoZhenProcessor();
          xiangYang33Venues = processor.process(xiangYang33Data.data, this.selectedDate);
        }
        
        // 将向阳33小镇校区数据添加到allData数组
        allData.push(...xiangYang33Venues);
        
        // 解析向阳星河城校区场地数据
        let xiangYangXingHeChengVenues = [];
        if (xiangYangXingHeChengData && xiangYangXingHeChengData.data && xiangYangXingHeChengData.data.siteInfoTOs && xiangYangXingHeChengData.data.timeIntervalTOs) {
          // 使用向阳星河城校区处理器处理数据
          const processor = new XiangYangXingHeChengProcessor();
          xiangYangXingHeChengVenues = processor.process(xiangYangXingHeChengData.data, this.selectedDate);
        }
        
        // 将向阳星河城校区数据添加到allData数组
        allData.push(...xiangYangXingHeChengVenues);
        
        // 解析向阳振兴城校区场地数据
        let xiangYangZhenXingChengVenues = [];
        if (xiangYangZhenXingChengData && xiangYangZhenXingChengData.data && xiangYangZhenXingChengData.data.siteInfoTOs && xiangYangZhenXingChengData.data.timeIntervalTOs) {
          // 使用向阳振兴城校区处理器处理数据
          const processor = new XiangYangZhenXingChengProcessor();
          xiangYangZhenXingChengVenues = processor.process(xiangYangZhenXingChengData.data, this.selectedDate);
        }
        
        // 将向阳振兴城校区数据添加到allData数组
        allData.push(...xiangYangZhenXingChengVenues);
        
        // 解析拓德网球俱乐部场地数据
        let tuoDeVenues = [];
        if (tuoDeData && tuoDeData.data && tuoDeData.data.siteInfoTOs && tuoDeData.data.timeIntervalTOs) {
          // 使用拓德网球俱乐部处理器处理数据
          const processor = new TuoDeProcessor();
          tuoDeVenues = processor.process(tuoDeData.data, this.selectedDate);
        }
        
        // 将拓德网球俱乐部数据添加到allData数组
        allData.push(...tuoDeVenues);
        
        // 解析爱动金丰网球俱乐部场地数据
        let aiDongJinFengVenues = [];
        if (aiDongJinFengData && aiDongJinFengData.result && aiDongJinFengData.result.slots) {
          // 使用爱动金丰网球俱乐部处理器处理数据
          const processor = new AiDongJinFengProcessor();
          aiDongJinFengVenues = processor.process(aiDongJinFengData.result, this.selectedDate);
        }
        
        // 将爱动金丰网球俱乐部数据添加到allData数组
        allData.push(...aiDongJinFengVenues);
        // console.log('aiDongJinFengVenues', aiDongJinFengVenues);
        
        // 解析卓乐网球俱乐部场地数据
        let zhuoLeTennisVenues = [];
        if (zhuoLeTennisData && zhuoLeTennisData.result && zhuoLeTennisData.result.slots) {
          // 使用卓乐网球俱乐部处理器处理数据
          const processor = new ZhuoLeTennisProcessor();
          zhuoLeTennisVenues = processor.process(zhuoLeTennisData.result, this.selectedDate);
        }
        
        // 将卓乐网球俱乐部数据添加到allData数组
        allData.push(...zhuoLeTennisVenues);
        // console.log('zhuoLeTennisVenues', zhuoLeTennisVenues);
        
        // 解析爱力网球俱乐部场地数据
        let aiLiVenues = [];
        if (aiLiData && aiLiData.result && aiLiData.result.slots) {
          // 使用爱力网球俱乐部处理器处理数据
          const processor = new AiLiProcessor();
          aiLiVenues = processor.process(aiLiData.result, this.selectedDate);
        }
        
        // 将爱力网球俱乐部数据添加到allData数组
        allData.push(...aiLiVenues);
        // console.log('aiLiVenues', aiLiVenues);
        
        // 解析松山湖太鲁阁公园场地数据
        let songShanHuVenues = [];
        if (songShanHuData && songShanHuData.data && Array.isArray(songShanHuData.data)) {
          // 使用松山湖太鲁阁公园处理器处理数据
          const processor = new SongShanHuTaiLuGeProcessor();
          songShanHuVenues = processor.process(songShanHuData.data, this.selectedDate);
        }
        // console.log('songShanHuVenues', songShanHuVenues);
        
        // 合并所有场地数据
        allData = [...zhuoLeVenues, ...xiangYangVenues, ...xiangYangKangDiVenues, ...xiangYangYaYuanVenues, ...xiangYang33Venues, ...xiangYangXingHeChengVenues, ...xiangYangZhenXingChengVenues, ...tuoDeVenues, ...aiDongJinFengVenues, ...zhuoLeTennisVenues, ...aiLiVenues, ...songShanHuVenues, ...yuanFengVenues, ...luoJieVenues, ...yueJiVenues, ...yueJiFengTaiVenues, ...yueJiDianShangYuanVenues, ...yueJiHuMenDaDaoVenues];
        
        // 解析东城体育公园场地数据
        let dongChengVenues = [];
        if (dongChengData && dongChengData.data && dongChengData.data.length > 0) {
          // 使用东城体育公园处理器处理数据
          const processor = new DongChengProcessor();
          dongChengVenues = processor.process(dongChengData.data, this.selectedDate);
        }
        
        // 将东城体育公园场地数据添加到allData数组
        allData.push(...dongChengVenues);
        
        // 解析东莞市体育中心场地数据
        let dongGuanSportsCenterVenues = [];
        if (dongGuanSportsCenterData && dongGuanSportsCenterData.data && Array.isArray(dongGuanSportsCenterData.data)) {
          // 使用东莞市体育中心处理器处理数据
          const processor = new DongGuanTiYuZhongXinProcessor();
          dongGuanSportsCenterVenues = processor.process(dongGuanSportsCenterData.data, this.selectedDate);
        }
        // console.log('dongGuanSportsCenterVenues', dongGuanSportsCenterVenues);
        
        // 将东莞市体育中心场地数据添加到allData数组
        allData.push(...dongGuanSportsCenterVenues);
        

        
        // 解析3.5+网球（新基）场地数据
        let diSaiVenues = [];
        if (this.diSaiGroundData && this.diSaiGroundData.data && this.diSaiGroundData.data.records && this.diSaiGroundUseData && this.diSaiGroundUseData.data && this.diSaiGroundUseData.data.records) {
          this.currentQueryVenue = '3.5+网球（新基）';
          // 使用3.5+网球（新基）处理器处理数据
          const processor = new ThreePointFiveNewJiProcessor();
          diSaiVenues = processor.process({
            groundData: this.diSaiGroundData.data.records,
            useData: this.diSaiGroundUseData.data.records
          }, this.selectedDate);
        }
        // console.log('diSaiVenues', diSaiVenues);
        
        // 将3.5+网球（新基）场地数据添加到allData数组
        allData.push(...diSaiVenues);
        
        
        // 解析3.5+网球（福地）场地数据
        let fuDiVenues = [];
        if (this.fuDiData && this.fuDiData.data && this.fuDiData.data.itemArr && this.fuDiData.data.deskArr && this.fuDiData.data.timeArr) {
          this.currentQueryVenue = '3.5+网球（福地）';
          // 使用3.5+网球（福地）处理器处理数据
          const processor = new ThreePointFiveFuDiProcessor();
          fuDiVenues = processor.process(this.fuDiData.data, this.selectedDate);
        }
        // console.log('fuDiVenues', fuDiVenues);
        
        // 将3.5+网球（福地）场地数据添加到allData数组
        allData.push(...fuDiVenues);
        
        // 解析为傲网球（香树店）场地数据
        let weiAoVenues = [];
        if (weiAoData && weiAoData.data && Array.isArray(weiAoData.data)) {
          this.currentQueryVenue = '为傲网球（香树店）';
          // 使用为傲网球（香树店）处理器处理数据
          const processor = new WeiAoXiangShuProcessor();
          weiAoVenues = processor.process(weiAoData.data, this.selectedDate);
        }
        // console.log('weiAoVenues', weiAoVenues);
        
        // 将为傲网球（香树店）场地数据添加到allData数组
        allData.push(...weiAoVenues);
        // 
        // 解析buji网球俱乐部场地数据
        let bujiVenues = [];
        if (buJiData && buJiData.result && buJiData.result.slots) {
          // 设置当前查询的球馆名称
          this.currentQueryVenue = '埗击网球';
          // 使用埗击网球处理器处理数据
          const processor = new BuJiProcessor();
          bujiVenues = processor.process(buJiData.result, this.selectedDate);
        }
        // console.log('bujiVenues', bujiVenues);
        // 将埗击网球场地数据添加到allData数组
        allData.push(...bujiVenues);
        // 根据搜索关键词过滤场地数据
        let filteredData = allData;
        if (this.searchKeyword) {
          filteredData = allData.filter(item => 
            item.name.includes(this.searchKeyword) || 
            item.address.includes(this.searchKeyword)
          );
        }
        
        // 如果只显示标准场，则过滤掉非标准场地
        if (this.showOnlyStandard) {
          // 从配置文件中获取非标准场地列表
          const courtTypeConfig = require('@/components/courtTypeConfig.json');
          const nonStandardFields = [];
          
          // 遍历配置文件中的非标准场数据
          Object.values(courtTypeConfig['非标准场']).forEach(venues => {
            if (Array.isArray(venues)) {
              nonStandardFields.push(...venues);
            }
          });
          
          filteredData = filteredData.filter(item => 
            !nonStandardFields.some(field => item.name.includes(field))
          );
        }
        
        // 如果选择了特定俱乐部，则只显示该俱乐部的场地
        if (this.selectedClubNames.length > 0) {
          // console.log('过滤前场地数量:', filteredData.length);
          // console.log('选中的俱乐部:', this.selectedClubNames);
          // console.log('所有场地的dataSource:', filteredData.map(item => `${item.name}: ${item.dataSource}`));
          
          filteredData = filteredData.filter(item => {
            const isIncluded = this.selectedClubNames.includes(item.dataSource);
            // console.log(`场地 ${item.name} (dataSource: ${item.dataSource}) 是否包含在选中的俱乐部中: ${isIncluded}`);
            return isIncluded;
          });
          
          // console.log('过滤后场地数量:', filteredData.length);
        }
        
        // 根据球场类型配置过滤场地数据
        if (this.selectedCourtType !== '不限') {
          filteredData = filteredData.filter(item => 
            this.checkCourtType(item)
          );
        }
        
        // 转换数据模型
        let venues = filteredData.map(item => {
          // 创建新的场地对象
          const venue = new Venue(item);
          
          // 如果有选中的时间槽，则根据时间槽设置available属性
          if (this.selectedTimeSlots.length > 0) {
            // 检查选中的时间槽是否都有空闲时段
            // console.log('开始检查所有选中时间槽，选中的时间槽:', this.selectedTimeSlots);
            const allTimeSlotsFree = this.selectedTimeSlots.every(selectedSlot => {
              // 在场地的时间槽中查找匹配的时段
              // console.log('开始查找匹配时间槽，场地时间槽列表:', venue.timeSlots.map(s => ({
              //   time: s.time,
              //   isFree: s.isFree,
              //   beginDatetime: s.beginDatetime,
              //   endDatetime: s.endDatetime
              // })));
              
              const matchingSlot = venue.timeSlots.find(slot => {
                // 比较时间范围是否匹配
                const slotStartTime = slot.beginDatetime || (slot.time ? `${this.selectedDate} ${slot.time.split('-')[0]}:00` : null);
                const slotEndTime = slot.endDatetime || (slot.time ? `${this.selectedDate} ${slot.time.split('-')[1]}:00` : null);
                
                // 如果无法解析时间，则跳过该时段
                if (!slotStartTime || !slotEndTime) {
                  return false;
                }
                
                // 解析选中的时间槽
                const [selectedStartHour, selectedStartMinute] = selectedSlot.split('-')[0].split(':');
                const [selectedEndHour, selectedEndMinute] = selectedSlot.split('-')[1].split(':');
                
                // 将日期格式转换为iOS支持的格式
                const formatDateForIOS = (dateStr) => {
                  if (!dateStr) return new Date();
                  
                  // 如果已经是ISO格式或支持的格式，直接使用
                  if (dateStr.includes('T') || dateStr.includes('/')) {
                    return new Date(dateStr);
                  }
                  
                  // 将 "yyyy-MM-dd HH:mm:ss" 格式转换为 "yyyy/MM/dd HH:mm:ss"
                  const formattedStr = dateStr.replace(/-/g, '/');
                  return new Date(formattedStr);
                };
                
                const selectedStartTime = formatDateForIOS(`${this.selectedDate} ${selectedStartHour}:${selectedStartMinute}:00`).getTime();
                const selectedEndTime = formatDateForIOS(`${this.selectedDate} ${selectedEndHour}:${selectedEndMinute}:00`).getTime();
                
                // 调试选中时间槽的处理
                
                const slotStart = formatDateForIOS(slotStartTime).getTime();
                const slotEnd = formatDateForIOS(slotEndTime).getTime();
                
                // 检查时间范围是否有重叠
              const isOverlap = selectedStartTime < slotEnd && selectedEndTime > slotStart;
              
              // 调试时间匹配逻辑
              
              return isOverlap;
              });
              
              // 调试匹配结果
              
              // 如果找到匹配的时段且为空闲，则返回true
              return matchingSlot && matchingSlot.isFree;
            });
            
            venue.available = allTimeSlotsFree;
          } else {
            // 如果没有选中的时间槽，将available设置为undefined
            venue.available = undefined;
          }
          
          return venue;
        });
        
        
        venues = venues.filter(venue => venue.available !== false);
        
        
        // 更新场地列表
        this.venueList = venues;
        this.hasMore = false;
        
        // 按距离排序场地列表
        this.venueList.sort((a, b) => {
          // 如果distance属性存在，则按distance排序
          if (a.distance !== undefined && b.distance !== undefined) {
            return a.distance - b.distance;
          }
          // 如果只有a有distance属性，则a排在前面
          if (a.distance !== undefined) {
            return -1;
          }
          // 如果只有b有distance属性，则b排在前面
          if (b.distance !== undefined) {
            return 1;
          }
          // 如果都没有distance属性，则按名称排序
          return a.name.localeCompare(b.name);
        });
        
        // 如果场地列表为空，显示提示信息
        if (this.venueList.length === 0 && this.selectedTimeSlots.length > 0) {
          uni.showToast({
            title: '当前无空闲的场',
            icon: 'none'
          });
        }
      } catch (error) {
        console.error('加载场地数据失败:', error);
        uni.showToast({
          title: '加载失败',
          icon: 'none'
        });
      } finally {
        this.loading = false;
        // 数据加载完成后保存到缓存
        this.saveDataToCache();
      }
    },
    
    loadMoreVenues() {
      this.loadVenueData();
    },
    
    goToVenueDetail(venue) {
      uni.redirectTo({
        url: `/pages/venue/detail?id=${venue.id}`
      });
    },
    
    goToSettings() {
      uni.redirectTo({
        url: '/pages/settings/settings'
      });
    },
    
    restart() {
      // 重置搜索关键词
      this.searchKeyword = '';
      // 重置选中的日期为今天
      this.selectedDate = this.getCurrentDate();
      // 重置选中的时间槽（调用统一的重置方法）
      this.resetTimeSlots();
      // 重置选中的俱乐部
      this.selectedClubs = [];
      this.selectedClubNames = [];
      // 重置地区筛选后的球馆名称
      this.districtFilteredVenues = [];
      // 重置更多数据标志
      this.hasMore = true;
    },
    
    isTimeOverlap(start1, end1, start2, end2) {
      // 将日期格式转换为iOS支持的格式
      const formatDateForIOS = (dateStr) => {
        if (!dateStr) return new Date();
        
        // 如果已经是ISO格式或支持的格式，直接使用
        if (dateStr.includes('T') || dateStr.includes('/')) {
          return new Date(dateStr);
        }
        
        // 将 "yyyy-MM-dd HH:mm:ss" 格式转换为 "yyyy/MM/dd HH:mm:ss"
        const formattedStr = dateStr.replace(/-/g, '/');
        return new Date(formattedStr);
      };
      
      const s1 = formatDateForIOS(start1).getTime();
      const e1 = formatDateForIOS(end1).getTime();
      const s2 = formatDateForIOS(start2).getTime();
      const e2 = formatDateForIOS(end2).getTime();
      
      // 检查时间范围是否有重叠
      return s1 < e2 && e1 > s2;
    },
    
    contactCustomerService() {
      // 显示自定义联系客服弹窗
      this.showCustomerServiceModal = true;
    },
    
    // 关闭联系客服弹窗
    closeCustomerServiceModal() {
      this.showCustomerServiceModal = false;
    },
    
    // 复制微信号
    copyWechatId() {
      uni.setClipboardData({
        data: 'ZHAIHANNENG',
        success: () => {
          uni.showToast({
            title: '微信号已复制',
            icon: 'success'
          });
          this.closeCustomerServiceModal();
        }
      });
    },
    
    // 获取当前位置（已弃用）
    getCurrentLocation() {
      this.locationLoading = true;
      this.getLocation();
    },
    
    // 获取模糊位置
    getFuzzyLocation() {
      this.locationLoading = true;
      uni.getLocation({
        type: 'gcj02', // 使用WGS-84坐标系
        success: (res) => {
          // console.log('获取模糊位置成功:', res);
          this.currentLocation.latitude = res.latitude;
          this.currentLocation.longitude = res.longitude;
          
          // 获取位置的大致地址
          this.getAddressFromLocation(res.latitude, res.longitude);
        },
        fail: (err) => {
          console.error('获取模糊位置失败:', err);
          this.locationLoading = false;
          uni.showToast({
            title: '获取位置失败1'+JSON.stringify(err),
            icon: 'none'
          });
        },
        complete: () => {
          this.locationLoading = false;
          this.locationAuthorized = true;
        }
      });
    },
    
    // 获取位置信息
    getLocation() {
      uni.getLocation({
        type: 'gcj02', // 使用国测局坐标系
        success: (res) => {
          // console.log('获取位置成功:', res);
          this.currentLocation.latitude = res.latitude;
          this.currentLocation.longitude = res.longitude;
          
          // 获取位置的详细地址
          this.getAddressFromLocation(res.latitude, res.longitude);
        },
        fail: (err) => {
          console.error('获取位置失败:', err);
          this.locationLoading = false;
          uni.showToast({
            title: '获取位置失败1',
            icon: 'none'
          });
          this.currentLocation = {
            latitude: 23.025707,
            longitude: 113.752252,
          };
        }
      });
    },
    
    // 根据经纬度获取地址信息
    getAddressFromLocation(latitude, longitude) {
      uni.request({
        url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=YOUR_KEY_HERE`, // 需要替换为实际的腾讯地图API密钥
        success: (res) => {
          if (res.data && res.data.status === 0 && res.data.result) {
            this.currentLocation.address = res.data.result.address;
            // console.log('获取地址成功:', this.currentLocation.address);
          }
        },
        fail: (err) => {
          console.error('获取地址失败:', err);
        },
        complete: () => {
          this.locationLoading = false;
        }
      });
    },
    
    // 获取天气信息
    async getWeatherInfo() {
      try {
        // 等待获取位置信息
        if (!this.currentLocation.latitude || !this.currentLocation.longitude) {
          // 如果没有位置信息，等待1秒后再次尝试
          this.currentLocation = {
            latitude: 23.025707,
            longitude: 113.752252,
          };
          await new Promise(resolve => setTimeout(resolve, 1000));
          if (!this.currentLocation.latitude || !this.currentLocation.longitude) {
            // console.log('无法获取位置信息，跳过天气查询');
            return;
          }
        }
        
        // 构建天气API请求URL
        const weatherUrl = `https://mpv2.weather.com.cn/v2/?lat=${this.currentLocation.latitude}&lng=${this.currentLocation.longitude}`;
        
        // 发起天气API请求
        const response = await new Promise((resolve, reject) => {
          uni.request({
            url: weatherUrl,
            method: 'GET',
            success: (res) => {
              resolve(res.data);
            },
            fail: (err) => {
              reject(err);
            }
          });
        });
        
        // console.log('天气数据:', response);
        
        // 解析天气数据
        if (response && response.hourly) {
          // 获取当前小时的天气数据
          const now = new Date();
          const currentHourStr = `${now.getHours().toString().padStart(2, '0')}:00`;
          
          // 查找当前小时的天气数据
          let currentWeatherData = null;
          
          // 计算未来12小时的时间范围，包括跨天的情况
          const futureHours = [];
          const currentHour = now.getHours();
          const maxHoursToShow = 12; // 固定显示12小时
          
          for (let i = 0; i < maxHoursToShow; i++) {
            const futureTime = new Date(now.getTime() + i * 60 * 60 * 1000);
            const hour = futureTime.getHours();
            // 使用与API返回数据相同的格式，例如 "15:00"
            const hourStr = `${hour.toString().padStart(2, '0')}:00`;
            futureHours.push(hourStr);
          }
          
          // 重置小时天气预报数据
          this.hourlyWeatherForecast = [];
          
          // 用于记录已经添加过的小时时间，避免重复
          const addedHours = new Set();
          
          // 遍历小时数据，只分析未来12小时内的天气
          Object.keys(response.hourly).forEach(key => {
            const hourData = response.hourly[key];
            // 检查小时数据是否在未来12小时范围内，并且该小时时间还没有被添加过
            if (futureHours.includes(hourData.hour) && !addedHours.has(hourData.hour)) {
              // 记录当前小时的天气数据
              if (hourData.hour === currentHourStr) {
                currentWeatherData = hourData;
              }
              
              // 添加到小时天气预报数据
              this.hourlyWeatherForecast.push({
                hour: hourData.hour,
                weatherCode: hourData.weatherCode,
                weatherText: hourData.weatherText,
                temperature: hourData.temperature
              });
              
              // 标记该小时时间已经添加过
              addedHours.add(hourData.hour);
            }
          });
          
          // 按时间排序小时天气预报数据
          this.hourlyWeatherForecast.sort((a, b) => {
            const timeA = a.hour.split(':').map(Number);
            const timeB = b.hour.split(':').map(Number);
            return timeA[0] * 60 + timeA[1] - (timeB[0] * 60 + timeB[1]);
          });
          // console.log('this.hourlyWeatherForecast', this.hourlyWeatherForecast);
          
          // 如果找到当前小时的天气数据，则更新当前天气
          if (currentWeatherData) {
            this.currentWeather = {
              weatherCode: currentWeatherData.weatherCode,
              weatherText: currentWeatherData.weatherText,
              temperature: currentWeatherData.temperature
            };
          }
          
          // 分析天气数据并显示提示
          this.analyzeWeatherData(response.hourly);
        }
      } catch (error) {
        console.error('获取天气信息失败:', error);
      }
    },
    
    // 分析天气数据并显示提示
    analyzeWeatherData(hourlyData) {
      // console.log('hourlyData', hourlyData);
      // 获取当前时间
      const now = new Date();
      
      // 计算未来12小时的时间范围，包括跨天的情况
      const futureHours = [];
      const currentHour = now.getHours();
      const maxHoursToShow = 12; // 固定显示12小时
      
      for (let i = 0; i < maxHoursToShow; i++) {
        const futureTime = new Date(now.getTime() + i * 60 * 60 * 1000);
        const hour = futureTime.getHours();
        // 使用与API返回数据相同的格式，例如 "15:00"
        const hourStr = `${hour.toString().padStart(2, '0')}:00`;
        futureHours.push(hourStr);
      }
      
      const rainTimes = [];
      let currentWeatherCode = 'd00'; // 默认晴天
      
      // 用于记录已经处理过的小时时间，避免重复
      const processedHours = new Set();
      
      // 遍历小时数据，只分析未来12小时内的天气
      Object.keys(hourlyData).forEach(key => {
        const hourData = hourlyData[key];
        // 检查小时数据是否在未来12小时范围内，并且该小时时间还没有被处理过
        if (futureHours.includes(hourData.hour) && !processedHours.has(hourData.hour)) {
          // 检查是否下雨（根据weatherCode判断，d04表示雷阵雨，其他雨天气码）
          const weatherCode = hourData.weatherCode;
          const isRainy = weatherCode === 'd04' || weatherCode === 'd03' || weatherCode === 'd07' || weatherCode === 'd08' || weatherCode === 'd09' || weatherCode === 'd10' || weatherCode === 'd11' || weatherCode === 'd12' || weatherCode === 'd13' || weatherCode === 'd14' || weatherCode === 'd15' || weatherCode === 'd16' || weatherCode === 'd17' || weatherCode === 'd18' || weatherCode === 'd19';
          
          if (isRainy) {
            rainTimes.push(hourData.hour);
          }
          
          // 记录当前小时的天气编码
          if (hourData.hour === futureHours[0]) {
            currentWeatherCode = weatherCode;
          }
          
          // 标记该小时时间已经处理过
          processedHours.add(hourData.hour);
        }
      });
      
      // 显示天气提示，传递当前天气编码
      this.showWeatherAlert(rainTimes, currentWeatherCode);
    },
    
    // 显示天气提示
    showWeatherAlert(rainTimes, weatherCode) {
      // 检查是否已经显示过天气提示
      const hasShownWeatherAlert = uni.getStorageSync('hasShownWeatherAlert');
      
      // 如果已经显示过，则不再显示
      if (hasShownWeatherAlert) {
        // console.log('天气提示已经显示过，不再重复显示');
        return;
      }
      
      let title = '天气提示';
      let content = '';
      let confirmColor = '#007aff';
      
      // 固定显示未来12小时
      const hoursText = '十二小时';
      
      if (rainTimes.length > 0) {
        // 有下雨时间
        const timeStr = rainTimes.slice(0, 3).join('、'); // 只显示前3个下雨时间
        content = `未来${hoursText}内有降雨，预计${timeStr}${rainTimes.length > 3 ? '等时间' : ''}可能会下雨，建议预订室内场地。`;
        confirmColor = '#ff9500';
      } else {
        // 没有下雨
        content = `未来${hoursText}天气晴朗，适合预订室外场地！`;
        confirmColor = '#007aff';
      }
      
      // 设置天气提示弹窗数据
      this.weatherAlertData = {
        title: title,
        content: content,
        weatherCode: weatherCode || 'd00',
        confirmColor: confirmColor
      };
      
      // 显示天气提示弹窗
      this.showWeatherAlertModal = false;
    },
    
    // 关闭天气提示弹窗
    closeWeatherAlertModal() {
      this.showWeatherAlertModal = false;
      // 标记已经显示过天气提示
      uni.setStorageSync('hasShownWeatherAlert', true);
    },
    
    // 确认天气提示
    confirmWeatherAlert() {
      // console.log('用户知道了天气情况');
      this.closeWeatherAlertModal();
    },
    
    // 导航到场地详情
    goToVenueDetail(venue) {
      // 从配置文件中获取球馆的详细信息
      const venueConfig = getVenueByName(venue.dataSource);
      
      if (venueConfig) {
        const allAddresses = getVenueAllAddresses(venueConfig.id);
        
        if (allAddresses.length > 1) {
          // 如果有多个地址，显示地址选择弹窗
          this.currentVenue = venueConfig;
          this.venueAddresses = allAddresses;
          this.showAddressModal = true;
        } else {
          // 如果只有一个地址，直接导航
          this.navigateToAddress(venueConfig, allAddresses[0]);
        }
      } else {
        uni.showToast({
          title: '球馆配置信息未找到',
          icon: 'none'
        });
      }
    },
    
    // 导航到指定地址
    navigateToAddress(venueConfig, address) {
      uni.openLocation({
        latitude: address.latitude,
        longitude: address.longitude,
        name: venueConfig.name,
        address: address.address,
        success: function() {
          // console.log('打开导航成功');
        },
        fail: function(err) {
          console.error('打开导航失败', err);
          uni.showToast({
            title: '导航功能暂不可用',
            icon: 'none'
          });
        }
      });
    },
    
    // 选择地址
    selectAddress(address) {
      this.navigateToAddress(this.currentVenue, address);
      this.showAddressModal = false;
    },
    
    // 关闭地址选择弹窗
    closeAddressModal() {
      this.showAddressModal = false;
      this.currentVenue = null;
      this.venueAddresses = [];
    },
    
    // 处理页面滚动
    handleScroll() {
      // 获取表单选择器的位置信息
      const query = uni.createSelectorQuery().in(this);
      query.select('.form-selector').boundingClientRect(data => {
        if (data) {
          // 获取页面滚动位置
          const pages = getCurrentPages();
          const currentPage = pages[pages.length - 1];
          const scrollTop = currentPage.scrollTop || 0;
          
          // 如果滚动位置超过表单选择器的底部，显示浮动顶部栏
          this.showFloatingHeader = scrollTop > data.bottom;
        }
      }).exec();
    },
    
    // 显示日期选择器（已弃用，现在直接使用picker组件）
    
    // 格式化日期为 YYYY-MM-DD
    formatDate(date) {
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      return `${year}-${month}-${day}`;
    },
    
    // 显示时间选择弹窗
    showTimePicker() {
      // 备份当前已选择的时间
      this.backupTimeSlots = [...this.selectedTimeSlots];
      
      // 检查是否为当天日期
      const today = new Date();
      const selectedDate = new Date(this.selectedDate);
      const isToday = today.toDateString() === selectedDate.toDateString();
      
      if (isToday) {
        // 获取当前小时
        const currentHour = today.getHours();
        
        // 重新生成时间槽，只包含当前时间及以后的时间
        this.timeSlots = [];
        for (let hour = currentHour; hour <= 23; hour++) {
          const startHour = hour.toString().padStart(2, '0');
          const endHour = (hour + 1).toString().padStart(2, '0');
          this.timeSlots.push({
            label: `${startHour}:00-${endHour}:00`,
            value: `${startHour}:00-${endHour}:00`
          });
        }
        
        // 清除已选择的过去时间
        this.selectedTimeSlots = this.selectedTimeSlots.filter(timeSlot => {
          const [startHour] = timeSlot.split('-')[0].split(':');
          return parseInt(startHour) >= currentHour;
        });
      } else {
        // 如果不是当天，则显示所有时间槽
        this.timeSlots = this.generateTimeSlots();
      }
      
      this.showTimeModal = true;
    },
    
    // 关闭时间选择弹窗
    closeTimeModal() {
      this.showTimeModal = false;
      // 恢复备份的时间
      this.selectedTimeSlots = [...this.backupTimeSlots];
      // 清空备份
      this.backupTimeSlots = [];
    },
    
    // 判断时间槽是否应该被禁用
    isTimeSlotDisabled(timeSlot) {
      // 检查是否为当天日期
      const today = new Date();
      const selectedDate = new Date(this.selectedDate);
      const isToday = today.toDateString() === selectedDate.toDateString();
      
      // 如果不是当天，则不禁用任何时间
      if (!isToday) {
        return false;
      }
      
      // 如果是当天，检查选择的时间是否是过去的时间
      const currentHour = today.getHours();
      const [startHour] = timeSlot.split('-')[0].split(':');
      
      // 如果选择的时间是过去的时间，则禁用
      return parseInt(startHour) < currentHour;
    },
    
    // 在弹窗中切换时间选择
    toggleTimeSlotInModal(timeSlot) {
      // 检查时间槽是否被禁用
      if (this.isTimeSlotDisabled(timeSlot)) {
        uni.showToast({
          title: '不能选择过去的时间',
          icon: 'none'
        });
        return;
      }
      
      const index = this.selectedTimeSlots.indexOf(timeSlot);
      if (index > -1) {
        // 如果已选中，则移除
        this.selectedTimeSlots.splice(index, 1);
      } else {
        // 如果未选中，则添加
        this.selectedTimeSlots.push(timeSlot);
      }
    },
    
    // 重置时间选择（弹窗内）
    resetTimeSlotsInModal() {
      this.selectedTimeSlots = [];
    },
    
    // 重置时间选择（页面重置）
    resetTimeSlots() {
      this.selectedTimeSlots = [];
      // 重置页面状态
      this.page = 1;
      this.venueList = [];
    },
    
    // 确认时间选择
    confirmTimeSelection() {
      this.showTimeModal = false;
      // 清空备份
      this.backupTimeSlots = [];
      // 重置页面并加载数据
      this.page = 1;
      this.venueList = [];
      this.searchVenues();
    },
    
    // 移除单个时间标签
    removeTimeSlot(index) {
      this.selectedTimeSlots.splice(index, 1);
      // 重置页面并加载数据
      this.page = 1;
      this.venueList = [];
      this.searchVenues();
    },
    
    // 切换底部导航栏
    switchTab(tab) {
      this.currentTab = tab;
      // 保存当前页面数据到缓存
      this.saveDataToCache();
      switch(tab) {
        case 'home':
          // 当前已经是首页，不需要跳转
          break;
        case 'court':
          uni.redirectTo({
            url: '/pages/court/court'
          });
          break;
        case 'mine':
          uni.redirectTo({
            url: '/pages/mine/mine'
          });
          break;
      }
    },
    
    // 初始化启动页
    initSplashScreen() {
      // 设置倒计时
      this.countdown = 3;
      
      // 启动倒计时定时器
      this.splashTimer = setInterval(() => {
        this.updateCountdown();
      }, 1000);
    },
    
    // 更新倒计时
    updateCountdown() {
      if (this.countdown > 0) {
        this.countdown--;
      } else {
        // 倒计时结束，自动关闭启动页
        this.closeSplashScreen();
      }
    },
    
    // 关闭启动页
    closeSplashScreen() {
      // 清除定时器
      if (this.splashTimer) {
        clearInterval(this.splashTimer);
        this.splashTimer = null;
      }
      
      // 添加淡出动画类
      this.isSplashScreenFading = true;
      
      // 等待动画完成后隐藏启动页
      setTimeout(() => {
        this.showSplashScreen = false;
        this.isSplashScreenFading = false;
      }, 500); // 与CSS中的过渡时间相匹配
    }
  }
};
</script>

<style lang="scss">
page{
  background-color: #F2F2F6;
}
.container {
  padding: 20rpx;
  padding-top: calc( env(safe-area-inset-top) + 20rpx);
}

// 启动页样式
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.1);
}
.timer-text{
  font-size: 28rpx;
  color: #666;
  margin-right: 20rpx;
}

.splash-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-timer {
  position: absolute;
  top: 200rpx;
  right: 40rpx;
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 10000;
}

.splash-controls {
  position: absolute;
  top: 40rpx;
  right: 40rpx;
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 10000;
}

.countdown-text {
  color: white;
  font-size: 32rpx;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10rpx 20rpx;
  border-radius: 300rpx;
  margin-right: 20rpx;
}

.close-button {
  background-color: rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 28rpx;
  padding: 10rpx 20rpx;
  border: none;
}

.header {
  text-align: center;
  margin-bottom: 20rpx;
}

.title {
  font-size: 32rpx;
  font-weight: bold;
  color: $uni-color-title;
}

.search-section {
  display: flex;
  margin-bottom: 20rpx;
}

.search-input {
  flex: 1;
  padding: 15rpx 20rpx;
  border: 1px solid $uni-border-color;
  border-radius: 16rpx;
}

.search-button {
  margin-left: 15rpx;
  padding: 15rpx 30rpx;
  background-color: $uni-color-primary;
  color: white;
  border-radius: 16rpx;
  line-height: 24px;
}

.date-selector {
  margin-bottom: 40rpx;
  text-align: center;
}

.date-display {
  display: inline-block;
  padding: 16rpx 32rpx;
  background: rgba(0, 122, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: $uni-color-primary;
  border-radius: 20rpx;
  font-size: 36rpx;
  font-weight: 600;
  border: 1px solid rgba(0, 122, 255, 0.25);
  box-shadow: 0 4rpx 16rpx 0 rgba(0, 122, 255, 0.2);
  letter-spacing: 1rpx;
  transition: all 0.3s ease;
  // margin: 20px;
}

.date-display:hover {
  transform: translateY(-2rpx);
  background: rgba(0, 122, 255, 0.2);
  box-shadow: 0 6rpx 20rpx 0 rgba(0, 122, 255, 0.3);
}

.time-selector {
  margin-bottom: 20rpx;
  padding: 20rpx;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20rpx;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4rpx 22rpx 0 rgba(31, 38, 135, 0.15);
}

.content {
  margin-bottom: 30rpx;
}

.time-label {
  margin-bottom: 10rpx;
  font-size: 28rpx;
}

.time-tags {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15rpx;
  padding: 10rpx;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16rpx;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.time-tag {
  padding: 17rpx 15rpx;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16rpx;
  font-size: 24rpx;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4rpx 16rpx 0 rgba(31, 38, 135, 0.15);
  transition: all 0.3s ease;
}

.time-tag.active {
 background: rgba(0, 122, 255, 0.8);
  color: white;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6rpx 20rpx 0 rgba(0, 122, 255, 0.35);
  transform: scale(1.02);
}

.golden-time {
  border: 2rpx solid rgba(255, 174, 0, 0.7);
  background: rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e29b00 !important;
  font-weight: 500;
  box-shadow: 0 4rpx 16rpx 0 rgba(255, 174, 0, 0.25);
  transition: all 0.3s ease;
}

.golden-time.active {
  background: rgba(0, 122, 255, 0.8) !important;
  color: white  !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 6rpx 20rpx 0 rgba(0, 122, 255, 0.35) !important;
  transform: scale(1.02);
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30rpx;
  padding: 15rpx;
  background-color: $uni-bg-color-grey;
  border-radius: 300rpx;
     background: #fff;
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: 0 8rpx 22rpx 0 rgba(31, 38, 135, 0.1);
    transition: all 0.3s ease;
}

.filter-label {
  margin-left: 10rpx;
  margin-right: 15rpx;
  font-size: 24rpx;
  width: auto;
  text-align: end;
}

// 表单选择器样式
.form-selector {
  margin-bottom: 30rpx;
  padding: 24rpx;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30rpx;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 30rpx;
  box-shadow: 0 8rpx 22rpx 0 rgba(31, 38, 135, 0.1);
    transition: all 0.3s ease;
}

.form-item {
  margin-bottom: 0;
}

.form-item:last-child {
  margin-bottom: 0;
}

.form-label {
  display: none;
}

.form-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24rpx 28rpx;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-input-top {
  border-radius: 40rpx 40rpx 0 0;
  border-bottom: none;
}

.form-input-bottom {
  border-radius: 0 0 40rpx 40rpx;
  border-top: none;
}

.form-divider {
    width: 95%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.08);
    margin-left: auto;
  }

.form-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.form-input:active::before {
  left: 100%;
}

.form-input:active {
  transform: scale(0.98);
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
}

.form-value {
  font-size: 32rpx;
  color: #333;
  font-weight: 500;
  flex: 1;
}

.form-arrow {
  width: 16rpx;
  height: 16rpx;
  margin-left: 16rpx;
  transition: transform 0.3s ease;
  position: relative;
  border: none;
  background: transparent;
}

.form-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10rpx;
  height: 10rpx;
  border-right: 2rpx solid #999;
  border-bottom: 2rpx solid #999;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: border-color 0.3s ease;
}

.form-input:active .form-arrow {
  transform: rotate(225deg);
}

.form-input:active .form-arrow::before {
  border-color: #007aff;
}

// 时间标签容器
.time-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12rpx;
  flex: 1;
  align-items: center;
  min-height: 40rpx;
}

// 选中的时间标签
.time-selected-tag {
  display: flex;
  align-items: center;
  padding: 8rpx 16rpx;
  background: rgba(0, 122, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 200rpx;
  border: 1px solid rgba(0, 122, 255, 0.25);
  box-shadow: 0 4rpx 16rpx rgba(0, 122, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.time-selected-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.time-selected-tag:active::before {
  left: 100%;
}

.time-selected-tag:active {
  transform: scale(0.95);
  background: rgba(0, 122, 255, 0.25);
  border-color: rgba(0, 122, 255, 0.4);
}

// 时间标签文本
.time-tag-text {
  font-size: 26rpx;
  color: #007AFF;
  font-weight: 500;
  margin-right: 8rpx;
}

// 时间标签删除按钮
.time-tag-remove {
  font-size: 28rpx;
  color: rgba(0, 122, 255, 0.7);
  font-weight: 300;
  line-height: 1;
  padding: 4rpx;
  border-radius: 50%;
  // background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.time-tag-remove:active {
  background: rgba(255, 59, 48, 0.2);
  color: #FF3B30;
  transform: scale(1.1);
}

// 占位符文本
.form-placeholder {
  font-size: 28rpx;
  color: #999;
  font-weight: 400;
}

.club-selector-wrapper {
  width: 185rpx;
}



.reset-button {
  height: 110rpx;
  line-height: 110rpx;
  padding: 0 40rpx;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 200rpx;
  font-size: 28rpx;
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 120rpx;
  text-align: center;
  box-shadow: 0 2rpx 8rpx 0 rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

// action-buttons中的重置按钮样式
.action-buttons .reset-button {
  flex: 1;
  max-width: 180rpx;
  // margin-right: 15rpx;
  height: 110rpx;
  line-height: 110rpx;
  font-size: 34rpx;
  box-sizing: border-box;
}

// 重置按钮loading状态样式
.action-buttons.loading .reset-button {
  display: none;
}

.reset-button:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1rpx 4rpx 0 rgba(0, 0, 0, 0.15);
}

.query-button::before {
  content: "";
    pointer-events: none;
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 400px;
    box-shadow: inset 0 3px 20px rgba(60,255,231,0.9), inset 0 -3px 14px rgba(106,255,237,0.6);
}
.circle {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    filter: blur(12px);
    background: rgba(78,255,233,0.7);
}
circle-1 animation {
    transform: translate(3.83838px, -6.73407px) translateZ(0px);
}
.circle.circle-1 {
    --x: 0;
    --y: -20px;
    --animation: circle-1;
    animation: circle-1-animation 4s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

.circle.circle-2 {
    --x: 70px;
    --y: 5px;
    --animation: circle-2;
    animation: circle-2-animation 4s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

.circle.circle-3 {
    --x: 40px;
    --y: -15px;
    --animation: circle-3;
    animation: circle-3-animation 4s infinite ease-in-out;
    background: linear-gradient(45deg, #7553ff, #7553ff);
    z-index: 0;
}

.circle.circle-4 {
    --x: 20px;
    --y: 5px;
    --animation: circle-4;
    animation: circle-4-animation 4s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

.circle.circle-5 {
    --x: 60px;
    --y: -20px;
    --animation: circle-5;
    animation: circle-5-animation 4s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

.circle.circle-6 {
    --x: 100px;
    --y: 20px;
    --animation: circle-6;
    animation: circle-6-animation 4s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

.circle.circle-7 {
    --x: 20px;
    --y: -30px;
    --animation: circle-7;
    animation: circle-7-animation 5s infinite ease-in-out;
    background: linear-gradient(45deg, rgba(78, 255, 233, 0.7), rgba(78, 255, 233, 0.7));
    z-index: 0;
}

.circle.circle-8 {
    --x: 120px;
    --y: -20px;
    --animation: circle-8;
    animation: circle-8-animation 5.5s infinite ease-in-out;
    background: linear-gradient(45deg, #7553ff, #7553ff);
    z-index: 0;
}

.circle.circle-9 {
    --x: 60px;
    --y: -40px;
    --animation: circle-9;
    animation: circle-9-animation 6s infinite ease-in-out;
    background: linear-gradient(45deg, #7553ff, #7553ff);
    z-index: 0;
}

.circle.circle-10 {
    --x: 80px;
    --y: -20px;
    --animation: circle-10;
    animation: circle-10-animation 6.5s infinite ease-in-out;
    background: linear-gradient(45deg, #7553ff, #1a23ff);
    z-index: 0;
}

.circle.circle-11 {
    --x: 20px;
    --y: 30px;
    --animation: circle-11;
    animation: circle-11-animation 7s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

.circle.circle-12 {
    --x: 140px;
    --y: 30px;
    --animation: circle-12;
    animation: circle-12-animation 7.5s infinite ease-in-out;
    background: linear-gradient(45deg, #1a23ff, #1a23ff);
    z-index: 0;
}

@keyframes circle-1-animation {
    0% {
        transform: translate(0, -20px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(-40px, -60px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(60px, -80px) scale(1.5);
        opacity: 0.9;
    }
    75% {
        transform: translate(30px, -40px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(0, -20px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-2-animation {
    0% {
        transform: translate(70px, 5px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(120px, -30px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(150px, 20px) scale(1.6);
        opacity: 0.9;
    }
    75% {
        transform: translate(90px, 40px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(70px, 5px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-3-animation {
    0% {
        transform: translate(40px, -15px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(20px, -50px) scale(1.4);
        opacity: 0.8;
    }
    50% {
        transform: translate(80px, -70px) scale(1.7);
        opacity: 0.9;
    }
    75% {
        transform: translate(60px, -30px) scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(40px, -15px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-4-animation {
    0% {
        transform: translate(20px, 5px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(-30px, 30px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(-60px, 60px) scale(1.6);
        opacity: 0.9;
    }
    75% {
        transform: translate(-20px, 40px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(20px, 5px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-5-animation {
    0% {
        transform: translate(60px, -20px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(100px, -50px) scale(1.4);
        opacity: 0.8;
    }
    50% {
        transform: translate(130px, -20px) scale(1.7);
        opacity: 0.9;
    }
    75% {
        transform: translate(80px, 10px) scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(60px, -20px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-6-animation {
    0% {
        transform: translate(100px, 20px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(150px, -10px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(180px, 50px) scale(1.6);
        opacity: 0.9;
    }
    75% {
        transform: translate(120px, 70px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(100px, 20px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-7-animation {
    0% {
        transform: translate(20px, -30px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(-20px, -70px) scale(1.4);
        opacity: 0.8;
    }
    50% {
        transform: translate(60px, -90px) scale(1.7);
        opacity: 0.9;
    }
    75% {
        transform: translate(40px, -50px) scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(20px, -30px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-8-animation {
    0% {
        transform: translate(120px, -20px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(170px, -60px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(200px, -20px) scale(1.6);
        opacity: 0.9;
    }
    75% {
        transform: translate(150px, 10px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(120px, -20px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-9-animation {
    0% {
        transform: translate(60px, -40px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(30px, -80px) scale(1.4);
        opacity: 0.8;
    }
    50% {
        transform: translate(100px, -100px) scale(1.7);
        opacity: 0.9;
    }
    75% {
        transform: translate(80px, -60px) scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(60px, -40px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-10-animation {
    0% {
        transform: translate(80px, -20px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(120px, -60px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(50px, -80px) scale(1.6);
        opacity: 0.9;
    }
    75% {
        transform: translate(90px, -40px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(80px, -20px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-11-animation {
    0% {
        transform: translate(20px, 30px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(-30px, 60px) scale(1.4);
        opacity: 0.8;
    }
    50% {
        transform: translate(-60px, 20px) scale(1.7);
        opacity: 0.9;
    }
    75% {
        transform: translate(-10px, 50px) scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(20px, 30px) scale(1);
        opacity: 0.7;
    }
}

@keyframes circle-12-animation {
    0% {
        transform: translate(140px, 30px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(190px, 70px) scale(1.3);
        opacity: 0.8;
    }
    50% {
        transform: translate(220px, 30px) scale(1.6);
        opacity: 0.9;
    }
    75% {
        transform: translate(170px, 60px) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(140px, 30px) scale(1);
        opacity: 0.7;
    }
}
.query-button {
  overflow: hidden;
  padding: 24rpx 48rpx;
  background: rgba(0, 122, 255, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  color: white;
  border-radius: 32rpx;
  font-size: 32rpx;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8rpx 24rpx 0 rgba(0, 122, 255, 0.4),
    0 4rpx 12rpx 0 rgba(0, 122, 255, 0.2),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  min-width: 160rpx;
  text-align: center;
  border-radius: 200rpx;
  position: relative;
  z-index: 1;
  --duration: 7s;
    --easing: linear;
    --c-color-1: rgba(78, 255, 233, 0.7);
    --c-color-2: #1a23ff;
    --c-color-3: #7553ff;
    --c-color-4: rgba(86, 255, 234, 0.7);
    --c-shadow: rgba(22, 201, 180, 0.2);
    --c-shadow-inset-top: rgba(60, 255, 231, 0.6);
    --c-shadow-inset-bottom: rgba(106, 255, 237, 0.8);
    --c-radial-inner: #579df7;
    --c-radial-outer: #579df7;
    --c-color: #fff;
    outline: none;
    position: relative;
    cursor: pointer;
    border: none;
    display: table;
    padding: 0;
    margin: 0;
    text-align: center;
    letter-spacing: .02em;
    line-height: 1.5;
    color: var(--c-color);
    background: radial-gradient(circle, #579df7, #579df7 60%);
    -webkit-box-shadow: 0 0 14px rgba(22,201,180,0.2);
     box-shadow: 0 0 14px rgba(22,201,180,0.2);
}

// action-buttons中的查询按钮样式
.action-buttons .query-button {
  flex: 2;
  max-width: 450rpx;
  height: 110rpx;
  line-height: 28rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34rpx;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 20rpx;
}

// 查询按钮loading状态样式
.action-buttons.loading .query-button {
  flex: 1;
  max-width: 100%;
}

// 查询按钮中的文字样式
.query-button text {
  position: relative;
  z-index: 2;
  color: white;
  font-weight: 600;
}

.query-button:active {
  transform: scale(0.95);
  background: rgba(0, 122, 255, 0.95);
  box-shadow: 
    0 4rpx 16rpx 0 rgba(0, 122, 255, 0.5),
    0 2rpx 8rpx 0 rgba(0, 122, 255, 0.3),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.4);
}

.query-button.loading {
  background: rgba(0, 122, 255, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 6rpx 20rpx 0 rgba(0, 122, 255, 0.3),
    0 3rpx 10rpx 0 rgba(0, 122, 255, 0.2),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.2);
  position: relative;
  padding-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.query-button.loading::before {
  content: '';
  position: relative;
  display: inline-block;
  width: 32rpx;
  height: 32rpx;
  border: 3rpx solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 5px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.filter-section-1{
  display: flex;
  justify-content: space-between;
}

// 查询和重置按钮容器样式
.action-buttons {
  // margin: 20rpx 0 30rpx 0;
  // padding: 15rpx;
  // background: rgba(255, 255, 255, 0.9);
  // backdrop-filter: blur(15px);
  // -webkit-backdrop-filter: blur(15px);
  // border-radius: 20rpx;
  // border: 1px solid rgba(255, 255, 255, 0.4);
  // box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
}

.action-buttons .button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  position: relative;
  width: 100%;
  margin-top: 40rpx;
  border-radius: 0;
}

// 浮动顶部栏样式
.floating-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 30rpx;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out;
  padding-top: calc(88rpx + env(safe-area-inset-top));
}

.floating-time-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8rpx;
  align-items: center;
  flex: 1;
  margin-right: 20rpx;
}

.floating-time-tag {
  display: flex;
  align-items: center;
  padding: 6rpx 24rpx;
  background: rgba(0, 122, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 160rpx;
  border: 1px solid rgba(0, 122, 255, 0.25);
  box-shadow: 0 2rpx 8rpx rgba(0, 122, 255, 0.15);
  transition: all 0.3s ease;
}

.floating-time-tag-text {
  font-size: 24rpx;
  color: #007aff;
  font-weight: 500;
}

.no-time {
  color: #999;
  font-size: 24rpx;
}

.floating-query-button {
  padding: 16rpx 40rpx;
  background: rgba(0, 122, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  border-radius: 200rpx;
  font-size: 28rpx;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4rpx 16rpx 0 rgba(0, 122, 255, 0.3),
    0 2rpx 8rpx 0 rgba(0, 122, 255, 0.2);
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-query-button.loading {
  background: rgba(0, 122, 255, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 6rpx 20rpx 0 rgba(0, 122, 255, 0.3),
    0 3rpx 10rpx 0 rgba(0, 122, 255, 0.2),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.2);
  position: relative;
  padding-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-query-button.loading::before {
  content: '';
  position: relative;
  display: inline-block;
  width: 24rpx;
  height: 24rpx;
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 5px;
  vertical-align: middle;
}

.floating-query-button:active {
  transform: scale(0.95);
  background: rgba(0, 122, 255, 0.95);
  box-shadow: 
    0 2rpx 12rpx 0 rgba(0, 122, 255, 0.4),
    0 1rpx 6rpx 0 rgba(0, 122, 255, 0.3);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 自定义开关样式 - iOS 26液态玻璃效果 */
.custom-switch {
  position: relative;
  width: 105rpx;
  height: 44rpx;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 202rpx;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 4rpx 12rpx 0 rgba(0, 0, 0, 0.1),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  cursor: pointer;
}

.custom-switch.active {
  background: rgba(0, 122, 255, 0.8);
  border-color: rgba(0, 122, 255, 0.6);
  box-shadow: 
    0 4rpx 16rpx 0 rgba(0, 122, 255, 0.4),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.6);
}

.switch-thumb {
  position: absolute;
  top: 3rpx;
  left: 3rpx;
  width: 62rpx;
  height: 38rpx;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 109rpx;
  box-shadow: 
    0 2rpx 8rpx 0 rgba(0, 0, 0, 0.15),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.custom-switch.active .switch-thumb {
  transform: translateX(36rpx);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 2rpx 10rpx 0 rgba(0, 122, 255, 0.3),
    inset 0 1rpx 2rpx 0 rgba(255, 255, 255, 0.95);
}

/* 开关点击反馈效果 */
.custom-switch:active {
  transform: scale(0.95);
}

.custom-switch.active:active {
  transform: scale(0.95);
}

/* 地址选择弹窗样式 */
.address-list {
  max-height: 400rpx;
  overflow-y: auto;
}

.address-item {
  padding: 20rpx;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.3s ease;
}

.address-item:hover {
  background-color: rgba(0, 122, 255, 0.05);
}

.address-item:last-child {
  border-bottom: none;
}

.address-location {
  font-size: 28rpx;
  font-weight: 600;
  color: #333;
  margin-bottom: 8rpx;
}

.address-detail {
  font-size: 24rpx;
  color: #666;
  margin-bottom: 8rpx;
  line-height: 1.4;
}

.address-primary {
  display: inline-block;
  padding: 4rpx 12rpx;
  background-color: rgba(0, 122, 255, 0.1);
  color: #007aff;
  border-radius: 8rpx;
  font-size: 20rpx;
  font-weight: 500;
}

/* 自定义模态框样式 */
.custom-modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.custom-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20rpx;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8rpx 32rpx 0 rgba(31, 38, 135, 0.2);
  width: 80%;
  max-width: 600rpx;
  max-height: 80%;
  overflow: hidden;
  animation: fadeInUp 0.3s ease;
}

.modal-header {
  padding: 30rpx;
  text-align: center;
  font-size: 32rpx;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-content {
  padding: 20rpx 30rpx;
}

.modal-footer {
  padding: 20rpx 30rpx 30rpx;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-button {
  padding: 16rpx 32rpx;
  border-radius: 16rpx;
  font-size: 28rpx;
  margin-left: 20rpx;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-button {
  background-color: rgba(245, 245, 245, 0.8);
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.cancel-button:hover {
  background-color: rgba(235, 235, 235, 0.9);
}

.confirm-button {
  background-color: rgba(0, 122, 255, 0.8);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.confirm-button:hover {
  background-color: rgba(0, 122, 255, 0.9);
}

.confirm-button:active {
  background-color: rgba(0, 122, 255, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30rpx);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

// 时间选择底部弹窗样式 - 模仿ClubSelectorPopup风格
.bottom-modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.bottom-modal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  border-top-left-radius: 30rpx;
  border-top-right-radius: 30rpx;
  overflow: hidden;
  z-index: 1002;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 80vh;
}

.bottom-modal.show {
  transform: translateY(0);
}

.bottom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40rpx 30rpx 20rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.modal-title {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
}

.modal-cancel {
  font-size: 28rpx;
  color: #999;
      padding: 0 10px;
    line-height: 40px;
    margin: -15px;
}

.bottom-modal-content {
  max-height: 900rpx;
  padding: 20rpx;
}

.time-tags-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30rpx;
}

.time-tag-popup {
  padding: 20rpx;
  background-color: rgba(245, 245, 245, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 24rpx;
  font-size: 24rpx;
  text-align: center;
  color: #333;
  border: 1rpx solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2rpx 8rpx 0 rgba(31, 38, 135, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.time-tag-popup.active {
  background-color: #42CF7F;
  backdrop-filter: blur(10px);
  color: white;
  border-color: #42CF7F;
  box-shadow: 0 4rpx 16rpx 0 rgba(66, 207, 127, 0.3);
}

.time-tag-popup.golden-time {
  background-color: rgba(245, 245, 245, 0.6);
  backdrop-filter: blur(10px);
  color: #333;
  border-color: rgba(255, 149, 0, 0.8);
  box-shadow: 0 2rpx 8rpx 0 rgba(31, 38, 135, 0.1);
  // font-weight: bold;
  /* 确保黄金时间段标签在网格中正常显示，不会因为字体加粗而换行 */
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-tag-popup.golden-time.active {
  background-color: rgba(255, 149, 0, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  border-color: rgba(255, 149, 0, 0.5);
  box-shadow: 0 4rpx 16rpx 0 rgba(255, 149, 0, 0.3);
}

.time-tag-popup.disabled {
  background-color: rgba(245, 245, 245, 0.3);
  backdrop-filter: blur(5px);
  color: #ccc;
  border-color: rgba(200, 200, 200, 0.3);
  box-shadow: none;
  opacity: 0.6;
  cursor: not-allowed;
}

.time-tag-popup.disabled:active {
  transform: none;
  background-color: rgba(245, 245, 245, 0.3);
}

.time-label-popup {
  font-size: 28rpx;
  // font-weight: 500;
}



.bottom-modal-footer {
  padding: 30rpx 40rpx 100rpx;
  border-top: 1rpx solid #eee;
}

.modal-buttons {
  display: flex;
  gap: 20rpx;
}

.modal-reset-button {
  flex: 0.5;
  height: 100rpx;
  background-color: #f7f7f7;
  color: #666;
  border-radius: 24rpx;
  font-size: 32rpx;
  font-weight: bold;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.confirm-button {
  flex: 1;
  height: 100rpx;
  background-color: #42CF7F;
  color: white;
  border-radius: 24rpx;
  font-size: 32rpx;
  font-weight: bold;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 日期选择器样式 */
.date-picker-view {
  height: 400rpx;
  width: 100%;
}

.picker-item {
  line-height: 80rpx;
  text-align: center;
  font-size: 32rpx;
  color: #333;
}

/* 联系客服弹窗样式 */
.customer-service-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40rpx 30rpx;
}

.wechat-info {
  font-size: 32rpx;
  font-weight: 600;
  color: #333;
  background-color: rgba(0, 122, 255, 0.1);
  padding: 20rpx 30rpx;
  border-radius: 16rpx;
  margin-bottom: 20rpx;
  border: 1px solid rgba(0, 122, 255, 0.2);
  box-shadow: 0 2rpx 8rpx rgba(0, 122, 255, 0.1);
}

.wechat-tip {
  font-size: 28rpx;
  color: #666;
  text-align: center;
  margin-top: 10rpx;
}

.customer-service-cancel {
  background-color: rgba(245, 245, 245, 0.9);
  color: #666;
  border: 1px solid rgba(200, 200, 200, 0.5);
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  flex: 1;
  height: 90rpx;
  line-height: 90rpx;
  text-align: center;
  border-radius: 45rpx;
  font-size: 30rpx;
  font-weight: 500;
  transition: all 0.3s ease;
}

.customer-service-cancel:active {
  background-color: rgba(235, 235, 235, 0.9);
  transform: scale(0.95);
}

.customer-service-copy {
  background-color: rgba(0, 122, 255, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4rpx 16rpx rgba(0, 122, 255, 0.3);
  flex: 1;
  height: 90rpx;
  line-height: 90rpx;
  text-align: center;
  border-radius: 45rpx;
  font-size: 30rpx;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-left: 20rpx;
}

.customer-service-copy:active {
  background-color: rgba(0, 86, 179, 0.9);
  transform: scale(0.95);
}

/* 天气显示组件样式 */
.weather-display {
  width: calc(100% - 40rpx);
  padding: 20rpx 30rox;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 160rpx;
  margin-top: 100rpx;
}

.weather-scroll {
  width: 100%;
  white-space: nowrap;
}

.weather-scroll-container {
  display: flex;
  padding: 0 20rpx;
}

.weather-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 30rpx;
  padding: 20rpx 0 ;
}

.weather-time {
  font-size: 24rpx;
  color: #666;
  // margin-top: 8rpx;
}


</style>
  